asciidoctor / docker-asciidoctor

:ship: A Docker image for using the Asciidoctor toolchain to process AsciiDoc content
https://hub.docker.com/r/asciidoctor/docker-asciidoctor/
Other
321 stars 151 forks source link

Upgrade the `Dockerfile` to utilize buildkit's directory caching for much faster builds #413

Open spkane opened 5 months ago

spkane commented 5 months ago

This makes it possible to cache dep downloads from tools like apt, go get, gem, etc.

See: https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/reference.md#run---mounttypecache

dduportal commented 5 months ago

Good idea. Have you already used it in CI environments (i’m wondering how it would work with GitHub Actions ephemeral workers)

spkane commented 5 months ago

It would likely take some work to get it working well in the CI/CD pipeline. It would likely require either taking advantage of Github caching (https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflow) or getting Docker to store the cache somewhere remote, or some combination of the two.

That being said, it would improve the local workflow, no matter what. :-)