Open simonszu opened 6 years ago
OK, my fault that i assumed that the entrypoint would automatically forward command line flags to acme.sh in the container. However:
$ docker exec acmesh_app_1 acme.sh --install --accountemail "mail@simonszu.de" [17:23:41]
[Tue Mar 27 15:25:11 UTC 2018] Using config home: /acme.sh
[Tue Mar 27 15:25:11 UTC 2018] Installing to /root/.acme.sh
cp: omitting directory 'acme.sh'
[Tue Mar 27 15:25:11 UTC 2018] Install failed, can not copy acme.sh
Wow, this issue is still open? How does one use acme.sh with docker-compose then?
@darkguy2008 after checked the Dockerfile. daemon only calls crond && while true; do sleep 1; done;
you need to call another command for the cert issue. here is a simple gist to use acme.sh with docker-compose:
https://gist.github.com/DrChai/e35ac6cf04299daf7dda9f66140a9664
“如何与Docker Compose一起使用”将是很棒的。 而一个脚本可以同时执行这两个操作。 首次颁发证书并定期更新。
A "How to use with Docker Compose" would be great. And a script that does both. Issue the certificate for the first time and renew it regularly.
Another solution / 另一种解决方案 : https://gist.github.com/williamdes/a8f15c7acaa71cd4437c4a903784f0e1
Installation via docker fails. After starting a container in daemon mode, the next step to execute is to execute
--install
, i suppose, since the docker environment is quite similar to plain installation. If not, the instructions for docker are a bit unclear.Steps to reproduce
Start acme.sh docker container with this docker-compose settings (a bit differently from plain docker compose, since i use ansible, but the general semantics should be the same)
Result: Container is running and is called
acmesh_app_1
. Next step: Trying to register an account via acme protocol:docker exec acmesh_app_1 --install --accountemail "mail@simonszu.de"
Result:
The dockerfile already configures the acme.sh inside the container to have it's home in
/acme.sh
, so i am wondering why it tries to write to/root
. This will change the content of the container outside of any volumes, so it's not very desireable.Debug log