From f4d03d5190968ad066f3571bad2c32655bc7896d Mon Sep 17 00:00:00 2001 From: askiiart Date: Tue, 14 Nov 2023 13:25:43 -0600 Subject: [PATCH] Finally get run.sh working properly --- Dockerfile | 5 ++--- README.md | 4 +--- run.sh | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index bbaa192..31302e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 -CMD ["/root/run.sh"] \ No newline at end of file +ADD run.sh /root/run.sh +CMD [ "/root/run.sh" ] \ No newline at end of file diff --git a/README.md b/README.md index 03bd583..ac0d439 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/run.sh b/run.sh index 5bf8c78..f551e20 100755 --- a/run.sh +++ b/run.sh @@ -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 $@ \ No newline at end of file +sh -c $@