Skip to content

Commit

Permalink
Update config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
azagniotov authored Jan 20, 2024
1 parent 8f97f4a commit 05e83f6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,18 @@ build_push_image_steps: &build_push_image_steps
- run:
name: Building and Pushing Multi Arch Docker images
working_directory: ~/repo/docker/jdk<< parameters.jdk_version >>
# Best way to cache multi-stage + multi-platform image builds
# https://github.com/docker/buildx/discussions/1382#discussioncomment-7834832
command: |
whoami
ls -al
docker run --rm --privileged tonistiigi/binfmt --install all
docker context create tls-environment
docker buildx create tls-environment --use
docker buildx build --cache-from=type=registry,ref=azagniotov/stubby4j:buildcache-arm64-jre<< parameters.jdk_version >> --cache-to=type=registry,ref=azagniotov/stubby4j:buildcache-arm64-jre<< parameters.jdk_version >> --platform linux/arm64 --load .
docker buildx build --cache-from=type=registry,ref=azagniotov/stubby4j:buildcache-amd64-jre<< parameters.jdk_version >> --cache-to=type=registry,ref=azagniotov/stubby4j:buildcache-amd64-jre<< parameters.jdk_version >> --platform linux/amd64 --load .
docker buildx build --cache-from=type=registry,ref=image:azagniotov/stubby4j:buildcache-amd64-jre<< parameters.jdk_version >> --cache-from=type=registry,ref=azagniotov/stubby4j:buildcache-arm64-jre<< parameters.jdk_version >> --build-arg REVISION=master --platform linux/amd64,linux/arm64 -f Dockerfile.arm64 -t azagniotov/stubby4j:latest-jre<< parameters.jdk_version >> --output=type=image --push .
docker buildx build --cache-from=type=registry,ref=azagniotov/stubby4j:buildcache-arm64-jre<< parameters.jdk_version >> --cache-to=type=registry,ref=azagniotov/stubby4j:buildcache-arm64-jre<< parameters.jdk_version >> --build-arg REVISION=master -f Dockerfile.arm64 --platform linux/arm64 --load .
docker buildx build --cache-from=type=registry,ref=azagniotov/stubby4j:buildcache-amd64-jre<< parameters.jdk_version >> --cache-to=type=registry,ref=azagniotov/stubby4j:buildcache-amd64-jre<< parameters.jdk_version >> --build-arg REVISION=master -f Dockerfile.arm64 --platform linux/amd64 --load .
docker buildx build --cache-from=type=registry,ref=image:azagniotov/stubby4j:buildcache-amd64-jre<< parameters.jdk_version >> --cache-from=type=registry,ref=azagniotov/stubby4j:buildcache-arm64-jre<< parameters.jdk_version >> --build-arg REVISION=master -f Dockerfile.arm64 --platform linux/amd64,linux/arm64 -t azagniotov/stubby4j:latest-jre<< parameters.jdk_version >> --output=type=image --push .
docker context rm tls-environment
Expand Down

0 comments on commit 05e83f6

Please sign in to comment.