To ensure Docker can run on your computer, follow the instructions below. Here are some quick references:
- Amazing video about how to install Apache web server in Docker container
- Apache HTTP Server Project Documentation
Refer to this link to install Ubuntu.
sudo apt install apache2
Ensure your terminal starts with something like:
PS D:\CAT201\CAT201-Assignment-1\Apache>
docker run -dit --name cat-201-apache-app -p 8081:80 -v ${PWD}:/usr/local/apache2/htdocs/ httpd:2.4
Note: I'm hosting it on port 8081, but feel free to change it to 8080:80.
docker build -t apache-image:1.0 .
I'm naming my image as apache-image with Tag 1.0.
docker run -dit --name apache-container -p 8081:80 apache-image:1.0