Skip to content

Use Docker layer caching with docker-compose build (not just docker) #25728

Discussion options

You must be logged in to vote

ok, found the solution. I realized that maybe the docker-build-and-push action didn’t actually do anything with the generated image, i.e. it was not made available to the runner / docker. Turns out this is true and even documented:

github.com

docker/build-push-action - Export image to Docker

:octocat: GitHub Action to build and push Docker images with Buildx

Once you know what you’re looking for, it’s easy…

In case the link dies, the solution is to add load: True to the docker-build-and-push action:

- name: Build
        uses: docker/build-push-action@v2
        with:
          push: false
          load: true
          tags: valentijn/app:latest
          builder: ${{ steps.buildx.outputs.n…

Replies: 6 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rknop
Comment options

Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment