Skip to content

Explore using cache for docker build #452

@danielhollas

Description

@danielhollas
           set: |
               *.platform=linux/amd64
               *.output=type=registry,push-by-digest=true,name-canonical=true
               *.cache-from=type=local,src=/tmp/.buildx-cache
               *.cache-to=type=local,mode=max,dest=/tmp/.buildx-cache-new
           files: |
               docker-bake.hcl
               build.json

     # Temp fix for issue of fast size grow in local caching:
     # https://github.com/docker/build-push-action/issues/252
     # https://github.com/moby/buildkit/issues/1896
     - name: Move cache
       run: |
         rm -rf /tmp/.buildx-cache
         mv /tmp/.buildx-cache-new /tmp/.buildx-cache

Could you give it a try on caching? This may further speed the build?

Originally posted by @unkcpz in #439 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions