mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 01:06:36 +00:00
chore: don't bother sending any build context to Docker (#1226)
We don't actually use any build context, as we just mount the local directory as a volume anyway. Omitting it speeds up the container start-up time. This is an enhanced version of #1173
This commit is contained in:
parent
cbc9dfecf6
commit
68d50ba2f5
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
||||
*
|
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7,6 +7,7 @@
|
||||
# Text files
|
||||
dictionary text
|
||||
Dockerfile* text
|
||||
.dockerignore text
|
||||
.editorconfig text
|
||||
etcher text
|
||||
.git* text
|
||||
|
@ -65,11 +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
|
||||
# Docker complains with: ". includes invalid characters for a local
|
||||
# volume name, only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed" otherwise
|
||||
if [ "$ARGV_SOURCE_CODE_DIRECTORY" == "." ] ||
|
||||
[ "$ARGV_SOURCE_CODE_DIRECTORY" == "./" ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user