Build an Image Infrastructure as code: Containers are your exact environment (but not a whole VM). $ git add Dockerfile $ git commit -m “Dev and Ops run the same Dockerfile”
A Dockerfile defines a container image. Images layer additively. $ cat Dockerfile FROM ubuntu RUN apt-get -y install ruby ruby-dev sensu COPY ./dist /var/my_app/ EXPOSE 80 CMD ["./start.sh"]
Linux Containers are lightweight and perfect for microservices. Virtually zero added cost to application startup/restart. $ docker build # build an image from the Dockerfile $ docker run # run an instance of an image