Comments (7)
Hi captain828,
I am not sure how you start the image, but for me it sure looks like the entrypoint scirpt executes?
docker run -it -e CERTBOT_EMAIL=test -e USE_LOCAL_CA=1 -e DEBUG=1 jonasal/nginx-certbot:latest
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2023/12/21 10:37:40 [debug] Debug messages are enabled
from docker-nginx-certbot.
I am using docker-compose and passing an environment file for the entire compose script (extra services removed for brevity).
services:
nginx:
image: jonasal/nginx-certbot:latest-alpine
restart: unless-stopped
environment:
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
- APP_DOMAIN=${APP_DOMAIN}
- APP_HOST=${APP_HOST}
ports:
- 80:80
- 443:443
volumes:
- ./nginx/app.conf:/etc/nginx/templates/app.conf
- ./nginx/envar_substitution.sh:/docker-entrypoint.d/envar_substitution.sh
- ./nginx/static:/var/www/app/static
command: >
sh -cx "chmod +x /docker-entrypoint.d/envar_substitution.sh &&
/scripts/start_nginx_certbot.sh"
volumes:
nginx:
driver: local
Where envar_substitution.sh
is:
#!/bin/sh
export APP_DOMAIN
export APP_HOST
envsubst '${APP_DOMAIN},${APP_HOST}' < /etc/nginx/templates/app.conf > /etc/nginx/user_conf.d/app.conf
exec "$@"
from docker-nginx-certbot.
Can you add DEBUG=1 to your environment and remove the "command" section outright and paste the logs here.
from docker-nginx-certbot.
You could probably also do a docker inspect
on the current container to see which entrypoint it uses.
from docker-nginx-certbot.
Hhm, you're right, it is still using the original entrypoint according to inspect.
Removing the "command" section does lead to docker-entrypoint.sh being correctly executed again.
It's as if the command section is overwriting the entrypoint.
from docker-nginx-certbot.
So it's my bad in the end as docker-compose will overwrite the standard entrypoint if a command is set.
from docker-nginx-certbot.
Glad it seems to work now!
from docker-nginx-certbot.
Related Issues (20)
- Handshake failed with `-alpine` nginx images HOT 8
- [bug] Empty `privekey.pem` HOT 3
- Local CA Fallback HOT 5
- NGINX started multiple times after certificate renewal check HOT 11
- Getting errors using custom config HOT 2
- Error getting validation data HOT 5
- Failed to establish a new connection: [Errno -3] Temporary failure in name resolution HOT 5
- Certificate Authority failed to download the temporary challenge files created by Certbot. HOT 4
- Running with Dockerfile HOT 6
- Feature request: Fail2ban HOT 1
- Test nginx config on SIGHUP HOT 4
- [Third-party] Cloudflare proxy DNS, SSL encryption mode must be set to "Full" (or Full strict) HOT 3
- config file not being discovered HOT 4
- Update Dockerhub Image HOT 4
- Improve Azure File Share support HOT 2
- Conflicting servername xxx on 0.0.0.0:443 HOT 2
- Speed up DH generation HOT 4
- Renewal failed on challenge webroot HOT 5
- Add support for Bunny.net authenticator plugin for DNS-01 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-nginx-certbot.