support cache between runs

Currently, any --mount=type=cache mounts in the Containerfile are ineffective because the gitlab runners are not persisting that buildah cache between runs.

This could be supported at a few different levels:

distributed cache

Pros:

  • should be already doable by adding --cache-from and --cache-to to the existing CONTAINER_BUILD_EXTRA_ARGS (though we could make this more convenient)
  • best option for when build jobs are distributed between many different runners

Cons:

  • requires more bandwidth if your runners are not near your container registry

gitlab-ci.yml job cache configuration

Pros:

  • the most explicit and familiar to developers who do other types of gitlab-ci builds

Cons:

  • probably is going to pack everything up in a zip file, which seems unnecessarily slow for large images

executor volumes

Pros:

  • works the most like you'd expect from running podman or buildah locally
  • least archive and network overhead

Cons:

  • assumes something about the runner's configuration
  • not useful when your job switches runners