Super-linter: Is there any way to cache the docker image?

Created on 6 Jul 2020  路  7Comments  路  Source: github/super-linter

I'm using the following, it generally takes 1 minute to pull and build the image,

    - name: Super-Linter
      uses: docker://github/super-linter:v3

Is there any way I can do this faster by caching the docker image with github.com/actions/cache or https://github.com/marketplace/actions/build-docker-images-using-cache?

I tried with the latter docker cache, but got stuck at

unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /github/workspace/Dockerfile: no such file or directory
question

Most helpful comment

@wangwalton Another option would be to host the GitHub runner and have the image cloned to the machine already :)
this would bring down your costs, as well as speed up the process :)

All 7 comments

@wangwalton that's a great question... as we add more language support, it seems the time goes up and up...
Reaching out to internal hosting to see what our options are :)

@wangwalton Another option would be to host the GitHub runner and have the image cloned to the machine already :)
this would bring down your costs, as well as speed up the process :)

Speaking of how long it takes, are actions having some kind of service disruption? A bunch of builds on PRs seem to be hung waiting to start.

Or maybe pull layers based on languages to be validated. So if user specifies only JS, Ruby, pull only those containers?

This is actually a pretty interesting issue.

Following the instructions in README told me to use the docker image directly in my action. (Should that documentation be updated for GitHub actions?) This brings down runtime tons since we're just pulling the image, but using the GitHub action triggers a rebuild if I'm correct. Not sure what can be done about this on super-linter's end.

Unfortunately, if you use dependabot to update your actions, the docker image won't be bumped if you use that method. Luckily, docker updating is on dependabot's to-do.

Caching the docker image is more on the GitHub actions end than the action itself. Something related is https://github.com/actions/cache/issues/31 but seems like there is no current plan for the cache action to be used with docker at the moment but in the comments, there are some examples of community actions that can be used for this

Confirmed with GitHub staff on the actions feature, not really any great options regarding caching right now. Re-architecture is still an option to use multiple containers but I will direct that conversation to #7 . Closing this issue for now until another solution is available.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sergey-muntyanu picture sergey-muntyanu  路  4Comments

dshevtsov picture dshevtsov  路  4Comments

patrick-compass picture patrick-compass  路  4Comments

IlanCosman picture IlanCosman  路  4Comments

ymd-h picture ymd-h  路  3Comments