Leveraging Docker to build container images
The Docker engine makes the process of setting up containers much simpler. It provides a consistent meta-language for describing containers and command-line tools for building, interrogating, and running container images.
Writing a Dockerfile
Docker uses a simple syntax that you can use to define basic information about your container. This basic structure includes what base image to build onto (FROM
), who the author is (MAINTAINER
), files to copy and commands to execute (COPY
and RUN
), and what the entry point process should be (CMD
).
Much of this is similar to the structure of a Packer template, except for the entry point process. With Packer, it’s just a VM; whatever processes are running, based on how you configure, it will be running. With Docker, you need to explicitly state what process to start because containers run a single process in isolation.
You can also configure the runtime further by setting the working...