Build a docker container with Apache

To create a docker container with Apache, create a Dockerfile mkdir my-app cd my-app vi Dockerfile Paste following content into the Dockerfile from ubuntu:20.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y apache2 RUN echo ‘Hello World!’ > /var/www/html/index.html RUN echo ‘. /etc/apache2/envvars’ > /root/run_apache.sh && \ echo ‘mkdir -p /var/run/apache2’ >> /root/run_apache.sh && … Read more

Docker Build

Build a docker container with Apache docker build command is used to create a docker image from Dockerfile. To create an image, first lets create a working directory and change to the directory. mkdir ~/my-docker-image cd ~/my-docker-image Create a file with name Dockerfile vi Dockerfile Put following content in it FROM ubuntu:18.04 RUN apt update … Read more