This Docker image is based on the varunmanik/httpd:cicd
image and serves a custom index.html
file.
The Dockerfile is as follows:
FROM varunmanik/httpd:cicd
LABEL maintainer="Varun Manik"
COPY ./index.html /usr/local/apache2/htdocs/
EXPOSE 80
-
Build the Docker image:
docker build -t my-custom-httpd .
-
Run the Docker container:
docker run -d -p 80:80 --name my-httpd my-custom-httpd
-
Access the custom HTTPD server:
Open your browser and visit
http://localhost
.
To stop the running container, execute the following command:
docker stop my-httpd
To remove the stopped container, execute the following command:
docker rm my-httpd