amazon web services - 'aws configure' in docker container will not use environment variables or config files -
so have docker container running jenkins , ec2 registry on aws. have jenkins push containers ec2 registry.
to this, able automate aws configure
, get login
steps on container startup. figured able
export aws_access_key_id=* export aws_secret_access_key=* export aws_default_region=us-east-1 export aws_default_output=json
which expected cause aws configure
complete automatically, did not work. tried creating configs per aws docs , repeating process, did not work. tried using aws configure set
no luck.
i'm going bonkers here, doing wrong?
no real need issue aws configure
instead long populate env vars
export aws_access_key_id=aaaa export aws_secret_access_key=bbbb ... export zone , region
then issue
$(aws ecr get-login --region ${aws_region} )
you achieve same desired aws login status ... far troubleshooting suggest remote login running container instance using
docker exec -ti container bash
then manually issue above aws related commands interactively confirm run ok before putting same dockerfile
Comments
Post a Comment