In this step we shall create Dockerfile.
Create a Dockerfile with following content in current directory.
cat > Dockerfile << EOF
RUN apt-get update && apt-get install apache2 -y && apt-get clean
CMD ["apache2ctl", "-DFOREGROUND"]
Verify the file:
Above Dockerfile content describes a
Debian jessie Docker image with Apache web server installed.
FROMindicates the base image for our build
RUNline will be executed by Docker during the build
RUNcommands must be non-interactive. (You can‘t provide input to Docker during the build.)
- In many cases, we will add the