From 12648e0bc6d00344a3827a65ba7512ad9224c9fe Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 1 Apr 2024 16:10:04 -0400 Subject: [PATCH] feat: remove --restart docker arguments when not running deploy-phase containers This works around cases where developers may inadvertently add this to `run` containers which _should not_ have the `--restart` flag. Run containers are one-off, and if they fail, then they should fail hard. --- plugins/docker-options/docker-args-deploy | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/docker-options/docker-args-deploy b/plugins/docker-options/docker-args-deploy index c1606d215..53a8e14ea 100755 --- a/plugins/docker-options/docker-args-deploy +++ b/plugins/docker-options/docker-args-deploy @@ -37,6 +37,14 @@ trigger-docker-options-docker-args() { \#*) continue ;; + + --restart*) + if [[ "$PHASE" == "deploy" ]]; then + local output="$output $line" + fi + continue + ;; + *) case "$IMAGE_SOURCE_TYPE" in dockerfile | nixpacks)