-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
Having a docker-compose.yml with restart: always is good for services started by docker up. However when executing commands during a build or during development via docker run --rm ... it'll also restart that container and this command will loop forever.
- Could allow specifying
--restart neverfordocker runbut that's edge. - Should ignore
restart:duringdocker-compose run ...commands, only use it fordocker-compose startordocker-compose up - Could restart linked containers even if they don't have
restart: always. This would also fix the issue as one could do:
service:
links:
- web
restart: always
web:
image: nginx
links: php
php:
image: php
Then a docker-compose run --rm php ... would not restart this command, but a docker-compose up service would start and restart all linked services.
Metadata
Metadata
Assignees
Labels
No labels