docker-buildx/plugin
pat-s e93554e4bc feat: add support for AWS ECR (#110)
fix #74

Mainly borrowed from https://github.com/drone-plugins/drone-docker/tree/master/cmd/drone-ecr.

`drone/ecr` is still on 20.10.14 and sparsely updated/maintained. Would be great to add support for additional registries like ECR to buildx.
The login process is as follows:

1. Call the AWS API with some arguments to get a short-lived auth token (12h)
2. Use the token and Username `AWS` for the `docker login` call

## Notes

- To push to ECR, the full registry URL must be given in the tag, i.e. `registry/owner/repo`. For this, `Registry` must also be added the to `Build` struct besides the `Settings` struct
- For now I've only referenced the source in `ecr.go` by using the most recent commit of today. Should this be done differently?
- The implementation here from me is simple and probably a bit "naive" as this is my first "real" golang feature PR.
- I've tested this change with a custom image and was able to successfully push to ECR while dynamically creating a repository. Proper tests would still be great...
- Vars `assumeRole` and `externalID` are somehow not exposed in https://plugins.drone.io/plugins/ecr and I am not sure if this is by design or because they were just forgotten. Anyhow, this is reason I didn't expose them for now and just added internal dummy vars.
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2023-12-29 22:06:37 +00:00
..
coredns.go Add internal DNS server if no custom DNS is set (#45) 2022-11-23 14:01:45 +00:00
daemon.go Automatically generate buildkit config with registry CA file (#17) 2022-09-27 22:33:05 +02:00
docker.go feat: add support for AWS ECR (#110) 2023-12-29 22:06:37 +00:00
docker_test.go adds driver-opt arg as plugin parameter (#93) 2023-10-25 09:58:02 +00:00
ecr.go feat: add support for AWS ECR (#110) 2023-12-29 22:06:37 +00:00
impl.go feat: add support for AWS ECR (#110) 2023-12-29 22:06:37 +00:00
impl_test.go Add configurable tag for use with auto_tag (#36) 2022-11-05 03:25:44 +01:00
labels.go Enhance SemVersion detection (#52) 2022-12-21 17:11:09 +00:00
login.go Add support for multible registrys (#23) 2022-10-08 16:02:02 +02:00
plugin.go Fix func to determine default login (#29) 2022-10-11 11:38:36 +02:00
tags.go Enhance SemVersion detection (#52) 2022-12-21 17:11:09 +00:00
tags_test.go Enhance SemVersion detection (#52) 2022-12-21 17:11:09 +00:00