Skip to content

Instantly share code, notes, and snippets.

@leopard627
Created January 9, 2020 07:19
Show Gist options
  • Save leopard627/70c8becff81f5f98eca17467e995625f to your computer and use it in GitHub Desktop.
Save leopard627/70c8becff81f5f98eca17467e995625f to your computer and use it in GitHub Desktop.
ECR=$(docker exec -it guide-aws sh -c 'aws ecr get-login --no-include-email --region ap-northeast-2')
echo "creating login temp file"
_ECR=$(echo ${ECR} | tr -d '\r')
echo ${_ECR} > ecr.out
echo 'login into ecr'
$(cat ecr.out)
echo "removing temp file"
rm ecr.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment