Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose up -d certbot Fail #2803

Closed
china-enoch opened this issue Dec 22, 2020 · 7 comments
Closed

docker-compose up -d certbot Fail #2803

china-enoch opened this issue Dec 22, 2020 · 7 comments

Comments

@china-enoch
Copy link

Description:

docker-compose up -d certbot
Building certbot
Step 1/6 : FROM phusion/baseimage:bionic-1.0.0
---> 32c929dd2961
Step 2/6 : LABEL maintainer="Mahmoud Zalt mahmoud@zalt.me"
---> Using cache
---> 765d1aded17a
Step 3/6 : COPY run-certbot.sh /root/certbot/run-certbot.sh
---> Using cache
---> 30888cdd5df1
Step 4/6 : RUN apt-get update
---> Using cache
---> 26617a619f6d
Step 5/6 : RUN apt-get install -y letsencrypt
---> Running in 76b75c139451
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package letsencrypt
ERROR: Service 'certbot' failed to build : The command '/bin/sh -c apt-get install -y letsencrypt' returned a non-zero code: 100

Expected Behavior:

成功运行,且生成对应的证书

Context information:

Output of git rev-parse HEAD

{f73b8fb642ac5f90d575292a987377ace028fea3}

Output of docker version

{Docker version 20.10.0, build 7287ab3}

Output of docker-compose version

{docker-compose version 1.27.4, build 40524192}

System info: Mac, Windows or Linux. Include which disto/version

{ProductName:	macOS
ProductVersion:	11.0.1
BuildVersion:	20B50}

Steps to reproduce the issue:

Stacktrace & Additional info:

{paste here}
@china-enoch
Copy link
Author

docker-compose.yml certbot config

certbot:
build:
context: ./certbot
volumes:
- ./data/certbot/certs/:/var/certs
- ./certbot/letsencrypt/:/var/www/letsencrypt
environment:
- CN="service.test"
- EMAIL="919398752@qq.com"
networks:
- frontend

@adriangordon1231
Copy link

adriangordon1231 commented Dec 23, 2020

How do I fix this? I am having the same issue

@china-enoch
Copy link
Author

How do I fix this? I am having the same issue

You should change the file certbot/Dockerfile first line

FROM phusion/baseimage:latest

LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"

COPY run-certbot.sh /root/certbot/run-certbot.sh

RUN apt-get update
RUN apt-get install -y letsencrypt

ENTRYPOINT bash -c "bash /root/certbot/run-certbot.sh && sleep infinity"

docker-compose build certbot
docker-compose up -d certbot

But i have new issue, as same

473829BC-AFF5-433A-A288-B257CD5204D2

@stale
Copy link

stale bot commented Mar 24, 2021

Hi 👋 this issue has been automatically marked as stale 📌 because it has not had recent activity 😴. It will be closed if no further activity occurs. Thank you for your contributions ❤️.

@stale stale bot added the Stale label Mar 24, 2021
@stale stale bot removed the Stale label Mar 24, 2021
@bestlong
Copy link
Member

bestlong commented Apr 7, 2021

Duplicate #2679

@bestlong bestlong removed the Type: Bug label Apr 7, 2021
@stale
Copy link

stale bot commented Jul 6, 2021

Hi 👋 this issue has been automatically marked as stale 📌 because it has not had recent activity 😴. It will be closed if no further activity occurs. Thank you for your contributions ❤️.

@stale stale bot added the Stale label Jul 6, 2021
@stale
Copy link

stale bot commented Jul 27, 2021

Hi again 👋 we would like to inform you that this issue has been automatically closed 🔒 because it had not recent activity during the stale period. We really really appreciate your contributions, and looking forward for more in the future 🎈.

@stale stale bot closed this as completed Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants