Skip to content

jojomi/docker-nginx-static

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

docker-nginx-static

Docker container for serving static content using nginx

Executing

docker run --name "my-nginx" -P -v $(pwd)/example-content:/var/www jojomi/nginx-static

Find your container:

docker ps | grep "my-nginx"
CONTAINER ID        IMAGE                           COMMAND                CREATED             STATUS              PORTS                   NAMES
ba00b5c238fc        jojomi/nginx-static:latest   "nginx -D -f /etc   1 second ago        Up 1 second         0.0.0.0:49153->80/tcp   my-nginx

Check if it works:

curl localhost:49153
This is your content.

Building The Image Yourself (optional)

docker build -t jojomi/nginx-static .

The image is conveniently small at below 7 MB thanks to alpine:

docker images | grep nginx
jojomi/nginx-static   latest              b2e7a8364baa        1 second ago      6.498 MB

About

Docker container for serving static content using nginx

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published