Skip to content

Instantly share code, notes, and snippets.

@lantrix
Created April 15, 2020 05:18
Show Gist options
  • Save lantrix/c8b950b43a7ef29624ac023208fb07ef to your computer and use it in GitHub Desktop.
Save lantrix/c8b950b43a7ef29624ac023208fb07ef to your computer and use it in GitHub Desktop.
# Buildtime
DOCKER_BUILDKIT=1 docker build \
-f Dockerfile \
-t myimage \
--secret id=aws,src=$HOME/.aws/credentials \
.
# Runtime
docker run -it \
--rm \
--init \
--volume $(pwd):/workdir \
--volume $HOME/.aws:/root/.aws:ro \
--workdir /workdir \
myimage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment