Storing short-duration credentials such as ECR access tokens in .netrc is inconvenient. containertool has --username and --password command line arguments; it should also be able to read a username and password from environment variables.
Example:
export CONTAINERTOOL_PASSWORD=$(aws ecr get-login-password --region us-west-2)
export CONTAINERTOOL_USERNAME=AWS
swift package --swift-sdk x86_64-swift-linux-musl \
build-container-image \
--repository 123456789012.dkr.ecr.us-west-2.amazonaws.com/hello/world
Storing short-duration credentials such as ECR access tokens in
.netrcis inconvenient.containertoolhas--usernameand--passwordcommand line arguments; it should also be able to read a username and password from environment variables.Example: