Do not permit errors in docker build
authorDale Hamel <dale.hamel@shopify.com>
Wed, 21 Oct 2020 18:43:52 +0000 (14:43 -0400)
committeryonghong-song <ys114321@gmail.com>
Fri, 23 Oct 2020 00:05:49 +0000 (17:05 -0700)
scripts/docker/build.sh

index 728ef6d..e2952c3 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-
+set -e
 # Builds debian packages using docker wrapper
 
 function help() {
@@ -23,5 +23,5 @@ echo "Building ${distro} ${os_tag} release docker image for ${docker_repo}:${doc
 docker build -t ${docker_repo}:${docker_tag} --build-arg OS_TAG=${os_tag} -f Dockerfile.${distro} .
 
 echo "Copying build artifacts to $(pwd)/output"
-mkdir output
+mkdir -p output
 docker run -v $(pwd)/output:/output ${docker_repo}:${docker_tag} /bin/bash -c "cp /root/bcc/* /output"