In first task I wrote Dockerfile that based on nginx. It copy HTML file into it and expose it on port 80 and activate nginx as a web server. I build the Image : docker build -t image_name:tag and run the container docker run -it --rm -d -p 8080:80 --name ex1 image_name Then I open the browser and browse localhost port 8080 to see the HTML file running by the container.
In second task I wrote docker-compose.yaml that build the Dockerfile from first task and run it on port 8080 and also run redis image as a container. I build the docker-compose: docker-compose build And run the containers: docker-compose up Then by typing docker ps I saw both containers running: