deploying a sample
Deploying a sample containing a static web-site and using nginx web-server
Last updated
Was this helpful?
Deploying a sample containing a static web-site and using nginx web-server
Last updated
Was this helpful?
Following tutorial and a web-server for a simple static web-site example.
Running (and downloading if necessary) $ docker run --rm prakhar1989/static-site
Running with detached terminal $ docker run -d --rm prakhar1989/static-site
To stop this container, execute the command $ docker ps -a
to get the container_id
and $ docker rm container_id -f
(-f to force)
Running detached giving a name $ docker run -d --name static-site prakhar1989/static-site
Running and exposing preconfigured ports $ docker run -d -P --name static-site prakhar1989/static-site
Show exposed ports $ docker port static-site
Forwarding requests of a specific port to a container's internal port $ docker run -p 8888:80 prakhar1989/static-site
Browse to should show nginx welcome page
To stop this container $ docker stop static-site
A command to prune containers is necessary to clean the cache
To stop this container cleaning the cache $ docker rm static-site -f