Skip to content

Commit

Permalink
follow shellcheck suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirianni committed Feb 7, 2021
1 parent 3ed8781 commit 228ee70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ IMAGE_TAG="${IMAGE}:${TAG}"
CONTAINER_NAME="${IMAGE}-${TAG}"

clean () {
docker rm -f $CONTAINER_NAME && echo "cleaned up container ${CONTAINER_NAME}"
docker rmi -f $IMAGE_TAG && echo "cleaned up image ${IMAGE_TAG}"
docker rm -f "${CONTAINER_NAME}" && echo "cleaned up container ${CONTAINER_NAME}"
docker rmi -f "${IMAGE_TAG}" && echo "cleaned up image ${IMAGE_TAG}"
}
trap clean ERR

Expand All @@ -23,8 +23,8 @@ build () {
-t "${IMAGE_TAG}" \
-f build/docker/Dockerfile .

docker create -ti --name $CONTAINER_NAME $IMAGE_TAG bash
docker cp $CONTAINER_NAME:/app/build/artifacts/. build/artifacts/
docker create -ti --name "${CONTAINER_NAME}" "${IMAGE_TAG}" bash
docker cp "${CONTAINER_NAME}:/app/build/artifacts/." build/artifacts/
}

build
Expand Down

0 comments on commit 228ee70

Please sign in to comment.