Skip to content

Instantly share code, notes, and snippets.

@namoopsoo
Last active July 15, 2018 19:45
Show Gist options
  • Save namoopsoo/5dca9a1980717763ce80abcb8560613a to your computer and use it in GitHub Desktop.
Save namoopsoo/5dca9a1980717763ce80abcb8560613a to your computer and use it in GitHub Desktop.
docker build/push quick reference

Do a build

  • login from shell,
$(aws --profile my-local-aws-profile ecr get-login --no-include-email --region us-east-1)
  • build,
docker build -t name-of-image -f path/to/Dockerfile path/to/docker/context

Run your container

# run using an image name,
# note that -v takes an absolute path...
docker run -i -t -v $(pwd)/local/path:/docker/path name-of-image


# or with a specific image id...
docker run -d=false  -i -t ad6576e  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment