Sign inSign up

kafebob/rpi-nginx

By kafebob

•Updated over 8 years ago

A ready to use nginx server for your Raspberry Pi 3

Image
0

319

kafebob/rpi-nginx repository overview

⁠Description

  • Linux Alpine
  • Nginx compiled from source
  • S6 Overlay⁠ as a process supervisor
  • dnsmasq for DNS management
  • Nginx logs (access and error logs) are automatically streamed to stdout and stderr
  • s6 will automatically start nginx for you.
  • If nginx dies, so will the container.
  • Self-signed or custom certificates are supported.
  • Basic nginx configuration and a simple default HTML file.

⁠Repository

⁠How to use it

⁠Basic Container
⁠Without Https support
sudo docker run \
                --rm \
                --name nginx-server \
                -p 80:80 \
                kafebob/rpi-nginx

😸

⁠With Https support

If you pass the environment variable $NGINX_SSL_ENABLE=1 when you create a container then SSL is going to be enabled. Will be used to generate SSL self-signed certificates.

sudo docker run -e NGINX_ENABLE_SSL=1 \
                --rm \
                --name nginx-server \
                -p 80:80 -p 443:443 \
                kafebob/rpi-nginx
⁠Container using your content

This docker image use /var/www as a data volume, you can map your static html content with /var/www

sudo docker run \
                --rm -it \
                --name nginx-server \
                -v ~/your-content:/var/www
                -p 80:80 \
                kafebob/rpi-nginx
⁠Container with custom server configuration

This docker image also use /etc/nginx/conf.d as a data volume, map your your nginx server configuration with this folder

sudo docker run \
                --rm -it \
                --name nginx-server \
                -v ~/your-content:/var/www
                -v ~/your-custom-config:/etc/nginx/conf.d 
                -p 80:80 \
                kafebob/rpi-nginx

⁠Example

asciicast

⁠Resources

Read Hosting browser games on your Pi⁠ and Self-signed Https support⁠ one of my articles playing with this image.

Tag summary

Content type

Image

Digest

Size

9.6 MB

Last updated

over 8 years ago

docker pull kafebob/rpi-nginx