The first file we will look at is
shellhttpd folder and move
cd shellhttpd mv ../shellhttpd.disabled/Dockerfile .
This file contains all the commands a user would call on the command line to assemble a container image.
Dockerfile starts from a base image.
This base could be a distro such as Alpine or Ubuntu, or it could be setup for a specific application, such as Python or Nginx.
Think of the
Dockerfile as your way of customizing the base image.
For more information, see the Dockerfile Reference
Check the content of your
FROM alpine COPY httpd.sh /usr/local/bin/ CMD ["/usr/local/bin/httpd.sh"]
Dockerfile is short and simple to help get started.
The first line creates a layer from the latest Alpine Docker image. The final Docker image will contain all the files provided by this base, plus your additions.
Your first customization is on the second line.
COPY adds files from your Docker client’s current directory to your Docker image.
In this case, the shell script
httpd.sh is copied to
/usr/local/bin/ of your Docker image.
CMD, which can provide arguments for the
ENTRYPOINT is specified in this example as the default entrypoint,
/bin/sh -c, is enough.
CMD, the image will execute
/bin/sh -c /usr/local/bin/httpd.sh when running the container.