Alpine Linux with nginx configured for public web services.
9.1K
Alpine Linux with nginx configured for public web services.
Use virtual.host.com.conf (https://github.com/gjchentw/dockerfile-nginx/blob/master/virtual.host.com.conf), with default/self-signed certs:
docker service create --name nginx --replicas 1 -p 80:80 -p 443:443 --mount type=bind,source=$(pwd)/certs/virtual.host.com,target=/etc/ssl/certs/virtual.host.com --mount type=bind,source=$(pwd)/virtual.host.com.conf,target=/etc/nginx/conf.d/virtual.host.com.conf gjchen/nginx
Put your domain in /etc/ssl/domains.txt:
echo virtual.host.com >> /etc/ssl/domains.txt
Get certificates manually:
/etc/ssl/dehydrated -c --ocsp
Auto renew weekly by /etc/crontabs/root (inspired by gslin https://letsencrypt.tw/ ) :
0 0 * * * sleep $(expr $(printf "\%d" "0x$(hostname | md5sum | cut -c 1-8)") \% 86400);/etc/ssl/dehydrated -c --ocsp; nginx -s reload
Content type
Image
Digest
Size
6.5 MB
Last updated
almost 7 years ago
docker pull gjchen/nginx