Skip to content

Aliance/static-nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker alpine NGINX image for serving static files

Serve static pages with nginx via docker

Building an image

static-nginx $ docker build -t static-nginx .

Running a container

$ docker run -d -p 8000:80 -v $(pwd)/src:/www --name static static-nginx
  1. Use any port you wish, in this example I used a 8000.
  2. Mount you static files from ./src directory to /www directory into the container

Watch access logs

$ docker exec -it static tail -f /etc/nginx/logs/static.log

About

Serve static pages with nginx via docker

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages