This lab explains how to use
dockerfile to create a docker image.
A dockerfile is a text file that contains the commands necessary to
create an image using the
docker build command. A
uses these commands to build an image.
Copy files from a source on the host to the containers own filesystem at the set destination.
Execute a specific command within the container.
Set a default application to be used every time a container is created with the image.
Set environment variables.
Expose a specific port to enable networking between the container and the outside world.
Define the base image used to start the build process.
Define the full name and email address of the image creator.
Central executing directive for Dockerfiles.
Set the UID (the username) that will run the container.
Enable access from the container to a directory on the host machine.
Set the path where the command, defined with CMD, is to be executed.