Dockerfile is a file that you create which in turn produces a Docker image when you build it.
A Docker image is created by two actions:
- The first action is to create a
- The second action is to run some type of build command that uses the
Dockerfile is a text file that Docker reads in from top to bottom. It contains a bunch of instructions which informs Docker HOW the Docker image should get built.
In other worlds, a
Dockerfile is a recipe (or blueprint if that helps) for building Docker images, and the act of running a separate build command produces the Docker image from that recipe.
When you run a Docker image, it creates a Docker container.
Let's sum up:
Dockerfileis a "recipe" for Docker
- A Docker image is created by running a Docker command (which uses that
- A Docker container is a running instance of a Docker image
Learn more here.