Finally get run.sh working properly
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
askiiart 2023-11-14 13:25:43 -06:00
parent 918e5edf18
commit f4d03d5190
Signed by untrusted user who does not match committer: askiiart
GPG key ID: BC3800E55FB54D67
3 changed files with 5 additions and 8 deletions

View file

@ -1,6 +1,5 @@
FROM python:3.12-alpine
WORKDIR /etc/nginx
RUN pip install certbot certbot-nginx --no-cache-dir
RUN apk add nginx --no-cache
COPY run.sh /root
ADD run.sh /root/run.sh
CMD [ "/root/run.sh" ]

View file

@ -9,7 +9,7 @@
Example `docker run`:
```bash
docker run -d -e CERTBOT_DNS_PLUGIN=certbot-dns-cloudflare -v ./nginx-conf:/etc/nginx docker.askiiart.net/askiiart/certbot-nginx certbot --version
docker run -d -v ./nginx-conf:/etc/nginx docker.askiiart.net/askiiart/certbot-nginx certbot --version
```
Example `docker-compose.yml`:
@ -19,8 +19,6 @@ version: '3.7'
services:
hugo:
image: docker.askiiart.net/askiiart/certbot-nginx
environment:
- CERTBOT_DNS_PLUGIN=certbot-dns-cloudflare
volumes:
- ./nginx-conf:/etc/nginx
command: certbot --version

4
run.sh
View file

@ -1,8 +1,8 @@
#!/bin/sh
if [ -z "$CERTBOT_DNS_PLUGIN" ]; then
echo "No DNS plugin set, continuing"
echo "No DNS plugin set, skipping"
else
pip install $CERTBOT_DNS_PLUGIN
fi
certbot $@
sh -c $@