Skip to content

Instantly share code, notes, and snippets.

@vallettea
Last active August 29, 2015 13:56
Show Gist options
  • Save vallettea/9169397 to your computer and use it in GitHub Desktop.
Save vallettea/9169397 to your computer and use it in GitHub Desktop.
# Install VirtualBox https://www.virtualbox.org/wiki/Downloads
# create your home bin dir & add it to your PATH
mkdir -p ~/bin
curl -o ~/bin/boot2docker -k "https://raw.github.com/boot2docker/boot2docker/master/boot2docker"
export PATH=$HOME/bin:$PATH
mkdir -p ~/.boot2docker
# create the vm in ~/VirtualBox VMs and the disk in ~/.boot2docker
boot2docker init
# load the VM in the background, call `boot2docker down` when done, password is "tcuser"
boot2docker up
# install the osX docker client
brew install docker
# use ddocker to user the local docker
alias ddocker='docker -H localhost:4243'
# start an ubuntu container
ddocker run -i -t -p 8080:8080 -v /var/lib/docker/volumes/tile_data:/opt/data ubuntu /bin/bash
# check the current containers and get hash
ddocker ps a
# to commit a container
ddocker commit <hash> <name>
# attaching a commited container
ddocker run -i -t -p 8080:8080 -v /var/lib/docker/volumes/tile_data:/opt/data <container_name> /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment