Docker — Assignment 5

aravind
Jul 11, 2023

--

Photo by Rubaitul Azad on Unsplash

Tasks To Be Performed:
1. Create a sample HTML file
2. Use the Dockerfile from the previous task
3. Replace this sample HTML file inside the Docker container with the default page

1. Create a sample HTML file
2. Use the Dockerfile from the previous task
3. Replace this sample HTML file inside the Docker container with the default page

sudo nano index.html

sudo nano Dockerfile

FROM ubuntu
RUN apt update
RUN apt install apache2 -y
COPY index.html /var/www/html/
ENTRYPOINT apachectl -D FOREGROUND

sudo docker build . -t a5 (To Build the image)

sudo docker run -itd -p 80:80 a5

Photo by Alexas_Fotos on Unsplash

--

--