Last active
August 29, 2015 13:56
-
-
Save vallettea/9169397 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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