Repository contains Dockerfiles for different task.
Install docker in Ubuntu
$ wget -qO- https://get.docker.com/ | sh
Install docker in OSX
- Go to the boot2docker/osx-installer release page.
- Download Boot2Docker by clicking Boot2Docker-x.x.x.pkg in the "Downloads" section.
- Install Boot2Docker by double-clicking the package.
The installer places Boot2Docker in your "Applications" folder.
The installation places the docker and boot2docker binaries in your /usr/local/bin directory.
From your command line
Initialize and run boot2docker from the command line, do the following:
Create a new Boot2Docker VM.
$ boot2docker init
This creates a new virtual machine. You only need to run this command once.
Start the boot2docker VM.
$ boot2docker start
Display the environment variables for the Docker client.
$ boot2docker shellinit Writing /Users/mary/.boot2docker/certs/boot2docker-vm/ca.pem Writing /Users/mary/.boot2docker/certs/boot2docker-vm/cert.pem Writing /Users/mary/.boot2docker/certs/boot2docker-vm/key.pem export DOCKER_HOST=tcp://192.168.59.103:2376 export DOCKER_CERT_PATH=/Users/mary/.boot2docker/certs/boot2docker-vm export DOCKER_TLS_VERIFY=1
The specific paths and address on your machine will be different.
To set the environment variables in your shell do the following:
$ eval "$(boot2docker shellinit)"
You can also set them manually by using the export commands boot2docker returns.
Run the hello-world container to verify your setup.
$ docker run hello-world