Skip to content

Commit

Permalink
[docker] Use the buildkit when building images
Browse files Browse the repository at this point in the history
The docker buildkit is an opt in build engine that is faster and offers
more advanced image building features.
https://docs.docker.com/develop/develop-images/build_enhancements/

This patch sets `DOCKER_BUILDKIT=1` in the `docker-build.sh` file
to enable the buildkit. Follow on patches will use some of the
new features as well.

Change-Id: Ib1bff68d65d0d4039efccabf7e1288163aafee0c
Reviewed-on: http://gerrit.cloudera.org:8080/15390
Tested-by: Grant Henke <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
  • Loading branch information
granthenke committed Mar 9, 2020
1 parent c1b7d76 commit ef8696a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docker/docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ TAG_LATEST=${TAG_LATEST:=1}
TAG_HASH=${TAG_HASH:=0}
DOCKER_CACHE_FROM=${DOCKER_CACHE_FROM:=""}

# Enabled the docker buildkit so we can use advanced features
# like skipping unused stages and mounting scripts that don't
# need to remain in the image along with an improvement on
# performance, storage management, feature functionality, and security.
# https://docs.docker.com/develop/develop-images/build_enhancements/
export DOCKER_BUILDKIT=1

VERSION=$(cat "$ROOT/version.txt")
VCS_REF=$(git rev-parse --short HEAD || echo "")

Expand Down

0 comments on commit ef8696a

Please sign in to comment.