From 2ca726fc5dd2e27a69e4b64e9e29ca6b3d2aadfa Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 19 Jan 2025 22:42:59 +0000 Subject: [PATCH] [docker] exit early if build fails If the build fails, don't then attempt to run the container-which-wasn't-built --- .devcontainer/build.sh | 1 + .devcontainer/run.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/.devcontainer/build.sh b/.devcontainer/build.sh index f7b640c0..10f8b69a 100755 --- a/.devcontainer/build.sh +++ b/.devcontainer/build.sh @@ -1,3 +1,4 @@ #!/bin/sh +set -eu cd $(dirname $0)/../ docker run --rm -v ${PWD}:/app $(docker build -q -f .devcontainer/Dockerfile .) diff --git a/.devcontainer/run.sh b/.devcontainer/run.sh index d698c90c..8d1fae2c 100755 --- a/.devcontainer/run.sh +++ b/.devcontainer/run.sh @@ -1,3 +1,4 @@ #!/bin/sh +set -eu cd $(dirname $0)/../ docker run --rm -ti -v ${PWD}:/app $(docker build -q . -f .devcontainer/Dockerfile) /bin/bash