Docker最新Nginx镜像SSL配置被自动注释的排查求助
Docker Nginx镜像SSL配置被自动注释问题排查求助
使用最新版Docker Nginx镜像时遇到异常:挂载配置文件到容器后,SSL选项会被自动注释。尝试过重命名文件、将其挂载到nginx.conf或sites-enabled目录,问题依旧。以下是Shell脚本执行日志,求进一步排查方向。
执行日志
nginx | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration nginx | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh nginx | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf nginx | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
Nginx配置文件
(附两张配置截图)
Docker-compose Nginx配置块
version: '3' services: nginx: image: nginx:latest container_name: nginx hostname: ghost-nginx ports: # - 80:80 - 443:443 volumes: # - ./nginx/ssl/yourhost.xyz.key:/etc/nginx/yourhost.xyz.key:ro # - ./nginx/ssl/yourhost.xyz.crt:/etc/nginx/yourhost.xyz.crt:ro - /usr/ghost/conf/ghost.conf:/etc/nginx/conf.d/ghost.conf # - /usr/ghost/conf/ghost1.conf:/etc/nginx/conf.d/default1.conf - /etc/letsencrypt/live/Mydomain/fullchain.pem:/etc/letsencrypt/live/tildawn.nts.am/fullchain.pem - /etc/letsencrypt/live/Mydomain/privkey.pem:/etc/letsencrypt/live/tildawn.nts.am/privkey.pem # - /usr/proxy_zt/zt.conf:/etc/nginx/site-enabled/zt.conf - /etc/letsencrypt/options-ssl-nginx.conf:/etc/letsencrypt/options-ssl-nginx.conf - /etc/letsencrypt/ssl-dhparams.pem:/etc/letsencrypt/ssl-dhparams.pem # - ./etc/nginx/conf.d/ghost.conf:/usr/ghost/conf/ghost.conf #links: # - ghost networks: my_prod_net: restart: always
已尝试的解决方法
- 修改文件名并移至sites-enabled、conf.d等目录,无效
- 重建镜像并在容器内修改文件,生效但重启后配置丢失
内容的提问来源于stack exchange,提问作者Server_bro_1223
相关产品推荐
相关产品推荐

