-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Why the directory "/etc/nginx/certs" is volume? #171
Comments
I don't have a good reason for it being a volume. Might have been added as one mistakenly. |
One advantage is that certificates will never end up in an image when committing / pushing (I doubt you'd want to have your image on Docker Hub, containing your certificates). Otoh, the disadvantage is that certificates may be left behind in a volume, after the container has been removed (and the |
For my use case, I push image with certificates (and vhost config) to my private repository. I didn't think about commit. If the user commit the image and run this image to other machine, |
@ikeji that's the downside, basically, I don't think it should be a volume, but there should be a warning in the README that people think properly before committing/pushing an image; especially if it is pushed to a public repository 😄 |
Is it possible to remove the volume? Apparently it's not possible to create a volume using docker-compose when a volume is already specified in the Dockerfile: When I try to use the following configuration my /etc/nginx/certs dir is empty. Switching to docker run -v ./nginx/cert:/etc/nginx/certs works as desinged.
Not sure if the docker-compose (1.4) behaviour is correct in this situation... |
@geertvanheusden This is not true, so there must be something else going on. You may want to look at the output of |
@md5 You are right. I had some issues with this volume not being replaced/updated by docker-compose. Not sure if it is a bug or expected behaviour but after removing the stopped container and doing a docker-compose up again it works. |
@geertvanheusden I think what you're running into with There are probably others too since I've definitely seen reports across a variety of images that |
If you're not on the latest version of |
@md5 I am already running the latest version of
|
Those steps to reproduce look great. Any chance you'd want to report that over at https://github.com/docker/compose/issues, possibly on docker/compose#465 or another existing issue? |
@md5 Done! docker/compose#1882 |
+1 for remove volume /etc/nginx/certs from Dockerfile. We can add it from command line or docker-compose if it's needed, but can't remove it if not. |
This issue has been resolved by #692 and can be closed. |
Hi
I'm creating my container image from jwilder/nginx-proxy with my certs.
Reentry I updated the certs and re-build my container image,
then I updated my container by "docker-compose up" command,
But my container still use old certs.
Because the "/etc/nginx/certs" directory is volume and it's not updated by "docker-compose up".
After remove the volume by manual, new certs are works as intended.
This is question instead of bug reports.
Why the directory "/etc/nginx/certs" is volume?
The text was updated successfully, but these errors were encountered: