chore: create a temporary .dockerignore during the docker build step (#1173)

This speeds up the 'docker build' step, as it reduces the amount of 'build
context' that needs to be sent to docker.
This commit is contained in:
Andrew Scheller 2017-03-09 19:08:48 +00:00 committed by Juan Cruz Viotti
parent a624b24bfc
commit 0a9b67976c

View File

@ -65,7 +65,9 @@ fi
IMAGE_ID="etcher-build-$ARGV_ARCHITECTURE"
cp "$ARGV_SOURCE_CODE_DIRECTORY/.gitignore" "$ARGV_SOURCE_CODE_DIRECTORY/.dockerignore"
docker build -f "$DOCKERFILE" -t "$IMAGE_ID" "$ARGV_SOURCE_CODE_DIRECTORY"
rm -f "$ARGV_SOURCE_CODE_DIRECTORY/.dockerignore"
# Docker complaints with: ". includes invalid characters for a local
# volume name, only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed" otherwise