-
Notifications
You must be signed in to change notification settings - Fork 5.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
fig up
exits if container exits normally, but only first time
#705
Comments
I switched this around so that the dependency is reversed (realised I was accidentally exposing the docker socket as a volume in the nginx container) i.e
now when I
I'm not sure why it worked (albeit second time only) before, something to do with persistence of volumes I guess. Possibly related to #613 |
reading the discussion in #517 it sounds like my container should have some process that doesn't return, ie holds it open? or is there a better option for data-only container? |
That is correct, there needs to be a process running in the foreground. |
Is there a standard no-op process to use for this? I saw elsewhere some have used |
Why do you want a container without a process? I think what you want is to run nginx with |
This container doesn't run nginx, this one is basically a data-only container... I thought from the Docker docs it was quite acceptable to have one of those that exits with no process In my case I wanted to run a script, to write out nginx conf files to a volume shared with the actual nginx container. |
Ah, I missed that. Yes it's ok to have a data-only container. I use I guess that just doesn't work with You could also |
I can't directly use thanks very much, |
Depending on the OS, you can use |
this would be fixed by #741 |
@anentropic off-topic, but if you're looking for a way to automatically configure your NGINX, have a look at this project https://github.com/jwilder/nginx-proxy (and the software driving it: https://github.com/jwilder/docker-gen). |
Fixed by #1754, which will be in 1.5, and the race condition for grabbing containers in |
I have the following fig.yml
nginxconf
serviceCMD
runs a script which queries the docker api in order to generate nginx conf for containers that need it, the script exits naturally with a code0
problem I saw is the first time I
fig up
this happens:a bit annoying, but curiously if I do
fig up
again I see:...this time everything stays up
Why is this?
Is there some way I should adapt either my
nginx_conf
image or myfig.yml
to avoid needing to up twice?The text was updated successfully, but these errors were encountered: