Skip to content

Instantly share code, notes, and snippets.

@hankehly
Created September 15, 2022 00:39
Show Gist options
  • Save hankehly/0206bbdcf1c8ee37e2c296af1cfbaf8e to your computer and use it in GitHub Desktop.
Save hankehly/0206bbdcf1c8ee37e2c296af1cfbaf8e to your computer and use it in GitHub Desktop.
Blog Article Snippets - How to share private code without exposing it to the world
export CODEARTIFACT_AUTH_TOKEN=`aws codeartifact get-authorization-token \
--duration-seconds 900 \
 --domain <my_domain> \
 --query authorizationToken \
 --output text`
docker build \
 --build-arg CODEARTIFACT_USER=aws \
 --build-arg CODEARTIFACT_AUTH_TOKEN=$CODEARTIFACT_AUTH_TOKEN \
 --tag example \
 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment