Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate image layer caching on GitHub Actions #49

Open
rbreslow opened this issue Jun 23, 2022 · 0 comments
Open

Evaluate image layer caching on GitHub Actions #49

rbreslow opened this issue Jun 23, 2022 · 0 comments

Comments

@rbreslow
Copy link
Contributor

I've experimented with the following changes in the docker-compose.ci.yml file in an attempt to export image layers to the GitHub Actions cache:

services:
  image-deid-etl:
    image: image-deid-etl:${GIT_COMMIT:-latest}
    build:
      context: ./src/image_deid_etl
      cache_from: 
        - type=gha
      cache_to: 
        - type=gha,mode=max

(https://github.com/moby/buildkit#github-actions-cache-experimental)

Cache export is only available for the docker-container driver. However, when we create a new builder instance with the docker-container driver, it doesn't seem like Docker Compose uses it:

- uses: docker/setup-buildx-action@v2
  id: buildx
  with:
      driver: docker-container
      install: true

# Make BuildKit aware of GitHub Actions.
# https://github.com/moby/buildkit/tree/master#github-actions-cache-experimental
- uses: crazy-max/ghaction-github-runtime@v2

image

It looks like other folks have hit this in similar circumstances:

We shouldn't let this get in the way of CI setup since build times are < 2 minutes. However, we should reevaluate once there is progress on the pull request I mentioned because it'd be great to have an implementation of image layer caching on GitHub Actions, configured via Docker Compose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant