Skip to content

Commit

Permalink
Use Docker BuildKit for the CI and docker_script
Browse files Browse the repository at this point in the history
Docker BuildKit has a number of advanages over the tradiditonal
Docker back end - it's potentially quicker as it can make use of
parallel jobs when multi-stage Dockerfiles are used, and it also
enables the use of automatically set target/host ARGs, such as
TARGETARCH. This is especially useful when working with multiple
target architectures.
  • Loading branch information
ebeasant-arm committed Aug 27, 2020
1 parent 173fd13 commit 46424c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/docker_build
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ source "$SCRIPTS_DIR/common"
readonly DOCKER_UID="${UID:-0}"
readonly DOCKER_GID="$(id -g)"
readonly DOCKER_USER="${USER:-root}"
# Use the Docker BuildKit backend: Useful for quicker builds, and multi-arch
# builds, as it expands the automatic variables available to the container.
declare -x DOCKER_BUILDKIT=1

docker build \
--cache-from="$DOCKER_IMAGE_NAME:latest" \
Expand Down

0 comments on commit 46424c7

Please sign in to comment.