awslabs / amazon-ecr-credential-helper

Automatically gets credentials for Amazon ECR on docker push/docker pull
Apache License 2.0
2.45k stars 335 forks source link

Adds back Dockerfile for local builds #792

Closed austinvazquez closed 2 months ago

austinvazquez commented 2 months ago

Issue #, if available: The Dockerfile for building the credential helper was removed in #784 to simplify maintenance. The issue is the container is helpful for users which need to build the credential helper from source with only Docker as a dependency.

Description of changes: This commit reverts the removal of the repositories Dockerfile for local builds. The container was helpful for users which need to build the credential helper from source but do not have an environment to do so.

In addition to the revert, this chance adds dependabot configuration to update the base image for the container and reworks the docker make target to build artifacts with correct user permissions.

How was it tested? Ran make build-in-docker and make all-variants-in-docker in Amazon Linux 2023 EC2 instance with only Docker installed. Also verified the artifacts generated have correct user permissions. i.e. current user instead of root

Merged change to fork and verified dependabot automation opened PR for updating base container.

Cross-compilation using container in CI is successful.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.