docker / build-push-action

GitHub Action to build and push Docker images with Buildx
https://github.com/marketplace/actions/build-and-push-docker-images
Apache License 2.0
4.31k stars 553 forks source link

Add option for host address for S3 cache #944

Closed johanneszellinger closed 1 year ago

johanneszellinger commented 1 year ago

Description

Hi, I wanted to test around with the (currently still experimental?) S3 cache for image building. Our company hosts a internal Minio S3 storage as well as a Github enterprise server on-premise and we currently have the problem that too many heavy image-dependencies are too often re-downloaded for use in our kubernetes cluster.

I think a central cache on a S3 bucket might help with this, however I currently do not find any option to point to a privately hosted S3 storage. Adding this option would be quite helpful I think.

crazy-max commented 1 year ago

@TheRealRolandDeschain You can use the following attributes in cache-from, cache-to inputs: https://docs.docker.com/build/cache/backends/s3/#synopsis but indeed we don't have an attribute to set a custom host atm. Can you open an issue on BuildKit repo: https://github.com/moby/buildkit? Thanks.

crazy-max commented 1 year ago

Actually we have the endpoint_url attribute: https://github.com/moby/buildkit#s3-cache-experimental

@dvdksn I think we should update our docs in https://docs.docker.com/build/cache/backends/s3/#synopsis to add the missing attributes?

johanneszellinger commented 1 year ago

Hi, thank you - I will test this :)