Skip to content

Commit 1e91e30

Browse files
authored
Use BuildKit via "docker buildx" everywhere (#850)
1 parent e31c508 commit 1e91e30

4 files changed

+4
-7
lines changed

.github/workflows/build-test-deploy.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ jobs:
3030
3131
# TODO: Add docker layer caching when GitHub Actions cache is stabilized and works good with "satackey/action-docker-layer-caching@v0.0.11"
3232
- name: Build gProfiler executable
33-
# Using DOCKER_BUILDKIT=1 although it has another cache mechanism which is not supported by satackey/action-docker-layer-caching@v0.0.11
33+
# Using BuildKit although it has another cache mechanism which is not supported by satackey/action-docker-layer-caching@v0.0.11
3434
# We tried to cache using buildx cache (cache-from, cache-to flags) and got strange behavior when caching,
3535
# decided not to use buildkit here to get nice caches.
36-
# if we enable caching again, we can disable DOCKER_BUILDKIT.
3736
run: |
3837
mkdir -p output
3938
./scripts/build_x86_64_executable.sh
@@ -296,7 +295,6 @@ jobs:
296295
- name: Build and push
297296
run: |
298297
set -x
299-
export DOCKER_BUILDKIT=1
300298
301299
BASE_IMAGE="${{ env.GH_REPO }}:${{ env.RELEASE_VERSION }}"
302300
AARCH64_IMAGE="$BASE_IMAGE-aarch64"
@@ -342,7 +340,6 @@ jobs:
342340
- name: Push manifest
343341
run: |
344342
set -x
345-
export DOCKER_BUILDKIT=1
346343
347344
BASE_IMAGE="${{ env.GH_REPO }}:${{ env.RELEASE_VERSION }}"
348345
LATEST_IMAGE="${{ env.GH_REPO }}:latest"

scripts/build_aarch64_container.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ if [ "$#" -gt 0 ] && [ "$1" == "--skip-exe-build" ]; then
1010
else
1111
./scripts/build_aarch64_executable.sh
1212
fi
13-
DOCKER_BUILDKIT=1 docker build -f container.Dockerfile -t gprofiler --build-arg ARCH=$ARCH . "$@"
13+
docker buildx build -f container.Dockerfile -t gprofiler --build-arg ARCH=$ARCH . "$@"

scripts/build_x86_64_container.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ if [ "$#" -gt 0 ] && [ "$1" == "--skip-exe-build" ]; then
1010
else
1111
./scripts/build_x86_64_executable.sh
1212
fi
13-
DOCKER_BUILDKIT=1 docker build -f container.Dockerfile -t gprofiler --build-arg ARCH=$ARCH . "$@"
13+
docker buildx build -f container.Dockerfile -t gprofiler --build-arg ARCH=$ARCH . "$@"

scripts/build_x86_64_executable.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ GPROFILER_BUILDER=@sha256:0f4ec88e21daf75124b8a9e5ca03c37a5e937e0e108a255d890492
4040
NODE_PACKAGE_BUILDER_GLIBC=centos/devtoolset-7-toolchain-centos7@sha256:24d4c230cb1fe8e68cefe068458f52f69a1915dd6f6c3ad18aa37c2b8fa3e4e1
4141

4242
mkdir -p build/x86_64
43-
DOCKER_BUILDKIT=1 docker build -f executable.Dockerfile --output type=local,dest=build/x86_64/ \
43+
docker buildx build -f executable.Dockerfile --output type=local,dest=build/x86_64/ \
4444
--build-arg RUST_BUILDER_VERSION=$RUST_BUILDER_VERSION \
4545
--build-arg PYPERF_BUILDER_UBUNTU=$UBUNTU_VERSION \
4646
--build-arg PERF_BUILDER_UBUNTU=$UBUNTU_VERSION_1604 \

0 commit comments

Comments
 (0)