-
Notifications
You must be signed in to change notification settings - Fork 32
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
tmpfs unusable after container restart #53
Comments
Just double checked that older builds (e.g. 6.6 and 7.0.1) does not exhibit this problem. |
hi @tmuncks, can you detail how to reproduce this please? I used you |
I think you are precisely experiencing this problem. The actual messages are in the log:
For good measure, this is how I'm able to reproduce 100% of the time:
|
thanks, that's useful. The permission change here is really hurting us... The easy fix is to add version: '3.1'
services:
varnish:
image: "varnish:latest"
restart: "always"
volumes:
- "./varnish.vcl:/etc/varnish/default.vcl:ro"
tmpfs:
- "/var/lib/varnish/varnishd:exec"
user: root But of course, this loses you the unprivileged behavior, which is annoying. I need some time to understand why |
Cool... The The problem is actually a known docker issue: docker/for-linux#138 - unfortunately not one that appear to be solved anytime soon. The problem - as I understand it - is that when mounting a tmpfs, the resulting permissions are lifted from the underlying mountpoint, which is super weird and not the way mount normally works. So it is not a big surprise that so many people (myself included) are slightly baffled the first time the come across this. |
thanks, I opened an issue on the Anyway, thanks for the clear report and extra info, that's definitely appreciated. |
@tmuncks, I'm guessing your comment didn't exactly end up the way you expected, can you check it and possibly edit it on GitHub please? |
Sorry! I have no idea what that was... It was an accidental resend of a message I sent on April 24. I have deleted the bad one. Sorry again. |
Noting in case anyone else stumbles across this later. Thanks @gquintard for the upstream reporting. |
Solves issue: varnish#53
Using
tmpfs
does not work properly, after container restart.When the
/var/lib/varnish/varnishd
path already exists, docker does strange things when mounting a tmpfs. The end result is:First run:
After
docker-compose restart varnish
:This in turn gives:
This has not been an issue previously, so my suspicions go to the
USER varnish
statement that was recently added near the bottom of theDockerfile
?The text was updated successfully, but these errors were encountered: