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

Strange issue requiring both from-volume and volume #1177

Open
Nightwalker83 opened this issue Jan 2, 2025 · 3 comments
Open

Strange issue requiring both from-volume and volume #1177

Nightwalker83 opened this issue Jan 2, 2025 · 3 comments

Comments

@Nightwalker83
Copy link

Nightwalker83 commented Jan 2, 2025

Hi,

Not sure if it is a bug or not but I found something strange with:

docker run --detach \
    --volumes-from nginx-proxy \
    --name nginx-proxy-acme \
      --volume certs:/etc/nginx/certs \   
      --volumes-from nginx-proxy \
    --volume /var/run/docker.sock:/var/run/docker.sock:ro \
    --volume acme:/etc/acme.sh \
    --env DEFAULT_EMAIL="[email protected]" \
    nginxproxy/acme-companion

where if I put both

    --volumes-from nginx-proxy
      --volume certs:/etc/nginx/certs

but if I put

--volumes-from nginx-proxy

I receive the error:

Info: running acme-companion version v2.5.1-6-gea11f22

Warning: '/etc/nginx/certs' does not appear to be a mounted volume.

Error: can't access to '/etc/nginx/certs' directory !

Check that '/etc/nginx/certs' directory is declared as a writable volume.

on the other-hand if I put:
--volume certs:/etc/nginx/certs

I receive:

Info: running acme-companion version v2.5.1-6-gea11f22

Error: can't get nginx-proxy container ID !

Check that you are doing one of the following :

	- Use the --volumes-from option to mount volumes from the nginx-proxy container.

	- Set the NGINX_PROXY_CONTAINER env var on the letsencrypt-companion container to the name of the nginx-proxy container.

	- Label the nginx-proxy container to use with 'com.github.nginx-proxy.nginx'.

Thanks,

Aaron

@buchdag
Copy link
Member

buchdag commented Jan 2, 2025

Hi

I don't know why --volumes-from was failing in your case but the instructions when not using (or unable to use) --volumes-from are in the log message you quoted.

More details here : https://github.com/nginx-proxy/acme-companion/blob/main/docs/Getting-containers-IDs.md

@Nightwalker83
Copy link
Author

Yeah, tried adding them to the nginx--proxy container to still ran into problems.

@buchdag
Copy link
Member

buchdag commented Jan 4, 2025

Could you provide the exact commands you used for both containers and the resulting container logs ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants