Skip to content

Instantly share code, notes, and snippets.

@tingletech
Last active August 29, 2015 14:17
Show Gist options
  • Save tingletech/009bdea7b9aa60967ed7 to your computer and use it in GitHub Desktop.
Save tingletech/009bdea7b9aa60967ed7 to your computer and use it in GitHub Desktop.

tag your builds

docker build -t tag .

spin up to get a shell in the container

docker run --rm -e "AWS_ACCESS_KEY=$A1" -e "AWS_SECRET_KEY=$A2" -t -i tag /bin/bash

run a container in background, mapping some ports and a host directory. (If you are using Boot2Docker, your Docker daemon only has limited access to your OSX/Windows filesystem.) Dockerfile most EXPOSE port on container. host:container for -p and -v.

docker run -e "A=$a" -d -p 8888:8888 -v /Users/user/dir:/home --name container -t tag

In Dockerfile use CMD over ENTRYPOINT for more flexibility.

On Amazon Linux AMI, more packages are available that just the default AWS packages

yum list all --enablerepo=epel | grep what
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment