Say hello to docker
Just make sure you have nginx in your images
Download nginx image:
sudo docker pull nginx
First in the root of project run:
sudo docker build -t html-server-image:v1 .
Now its time to create your container:
sudo docker run --rm -d -p 8080:80 html-server-image:v1
Open your browser and open -> localhost:8080/app.html You should see this page :
Or you can curl in terminal:
curl localhost:8080/app.html
Congratulations :) you did it.
If you enjoy it star the repo in github or in docker hub
Docker hub link : https://hub.docker.com/r/pooulad/html-server-image