Skip to content

Commit

Permalink
feat: remove --restart docker arguments when not running deploy-phase…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
josegonzalez committed Apr 1, 2024
1 parent 456de35 commit 35eb6bf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/docker-options/docker-args-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 35eb6bf

Please sign in to comment.