Ready for Raspberry pi running the latest Alpine Linux with the latest supported Nginx
667
A recent and very small build of an ARM ready image for Raspberry Pi including the latest stable of the reverse proxy (Nginx) It's build on the recent Alpine Linux image and currently only ~ 8MB in size.
NGINX configurations can be either be done via local configurations:
--- on your docker host--
mkdir -p /opt/nginx/logs &&
mkdir /opt/nginx/conf.d
--extract the default config from the docker container in case we need to make adjustments cd /opt/nginx
docker pull bbme/rpi-nginx
docker run --name nginx bbme/rpi-nginx --find the container id via docker ps
docker exec cat /etc/nginx/conf.d/default.conf > default.conf docker exec cat /etc/nginx/nginx.conf > nginx.conf
Copy the files from the Docker image onto your local file system:
-- stop the container again and remove it docker stop docker rm
--Edit the config files according to your needs.
When you run the image now, you beam the local conf file into your image.
--run the image--on port 80 and 443 docker run --name=nginx -p 80:80 -p 443:443 -v /opt/nginx/nginx.conf:/etc/nginx/nginx.conf:ro -v /opt/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf:ro -v /opt/nginx/logs:/var/log/nginx bbme/nginx
I use systemd to startup the service:
I also add server certificates, and bind it to a nexctcloud service that is running in a different docker.
/etc/systemd/system/nginx.service [Unit] Description=nginx After=mysql.service nextcloud.service
[Service]
Restart=always
ExecStart=/usr/bin/docker run --name=%n
-p 80:80 -p 443:443
-v /etc/localtime:/etc/localtime:ro
-v /etc/timezone:/etc/timezone:ro
-v /opt/nginx/nginx2.conf:/etc/nginx/nginx.conf:ro
-v /opt/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf:ro
-v /opt/ssl/ca:/opt:ro
-v /opt/nginx/logs:/var/log/nginx
bbme/rpi-nginx
ExecStop=/usr/bin/docker stop -t 2 %n ; /usr/bin/docker rm -f %n
[Install] WantedBy=multi-user.target
Content type
Image
Digest
sha256:42512cc80…
Size
7.7 MB
Last updated
about 2 months ago
docker pull bbme/rpi-nginx