【发布时间】:2020-11-12 16:03:03
【问题描述】:
我正在尝试按照 Certbot 网站上的步骤将 Certbot 安装到我的 Nginx 容器中:https://certbot.eff.org/lets-encrypt/pip-nginx
Dockerfile:
FROM nginx:1.17.1
# install wget
RUN apt-get update
RUN apt-get install wget -y
# install certbot
RUN wget https://dl.eff.org/certbot-auto
RUN mv certbot-auto /usr/local/bin/certbot-auto
RUN chown root /usr/local/bin/certbot-auto
RUN chmod 0755 /usr/local/bin/certbot-auto
# get certificate
RUN /usr/local/bin/certbot-auto --nginx -y
# setup automatic renewal
...
我使用 docker-compose 构建图像
$ docker-compose build
构建在“#get certificate”步骤中止
...因为我无法在构建过程中输入“y”?
有没有办法在构建过程中输入“y”?我已经尝试传递 -y 标志,如我的 Dockerfile 中所示,但构建仍然中止。
【问题讨论】:
标签: docker nginx docker-compose certbot