feat: disable container restarts for stopped containers
This should avoid the case where the docker daemon starts the containers upon reboot.
This commit is contained in:
1 parent
1edb734df9
commit
173b87928c
3 files changed
+17
-1
No files matched your search
@@ -121,6 +121,7 @@ scheduler-docker-local-check-deploy() {
|
||||
! (is_container_status "$DOKKU_APP_CONTAINER_ID" "Running") && dokku_log_fail "App container failed to start!!"
|
||||
local container_restarts="$(docker inspect -f "{{ .RestartCount }}" "$DOKKU_APP_CONTAINER_ID")"
|
||||
if [[ $container_restarts -ne 0 ]]; then
|
||||
docker container update --restart=no "$DOKKU_APP_CONTAINER_ID" &>/dev/null || true
|
||||
docker stop "$DOKKU_APP_CONTAINER_ID" || true
|
||||
dokku_log_fail "App container failed to start!!"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user