You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run docker compose upjob2 does not complete successfully and job is not started (all good). Though if I run docker compose restartjob gets started, even if job2 does not complete successfully.
The same behavior can be observed, if restart: true is set and docker compose restart job2 is called.
Steps To Reproduce
Use compose.yaml shown above
run docker compose up, job should not get started
run docker compose restart, now job gets started, even if job2 does not complete successfully
restart command does not handle depends_on condition, which applies to container creation / initial start. restart just force container process to restart, but assigned resources (network, volumes, ...) are the same.
Can you please clarify the use-case you have for restart command ?
I have a data broker, an init container and some container that work on these data. I tried to use restart the init container to reconfigure the broker and at the same time restart all dependencies.
So I guess I need to use docker compose up and docker compose down
support for init container in Compose is indeed very minimal. Using up & down is probably the best workaround I can suggest.
I'll tag this issue as a feature request
Description
Hi,
I have the following
compose.yaml
:If I run
docker compose up
job2
does not complete successfully andjob
is not started (all good). Though if I rundocker compose restart
job
gets started, even ifjob2
does not complete successfully.The same behavior can be observed, if
restart: true
is set anddocker compose restart job2
is called.Steps To Reproduce
compose.yaml
shown abovedocker compose up
,job
should not get starteddocker compose restart
, nowjob
gets started, even ifjob2
does not complete successfullyCompose Version
Docker Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: