Vagrant box with Docker daemon accessible from a remote host. Very useful for Docker image builds under a Windows based operating system.
- Create Ubuntu 14.04 base box with Vagrant
- Install Docker daemon with additional tools
- Open Docker daemon socket to use from a remote host
- Log DOCKER_HOST environment variable
- Vagrant must be installed
- VirtualBox must be installed
- Create virtual machine with Vagrant:
vagrant up
-
Set DOCKER_HOST environment variable (use ip which is logged out by vagrant up):
set DOCKER_HOST=tcp://172.28.128.2:2375
-
Use docker-maven-plugin from fabric8 to build your Docker images:
mvn clean install docker:build
-
Set DOCKER_HOST environment variable (use ip which is logged out by vagrant up):
export DOCKER_HOST=tcp://172.28.128.2:2375
-
Use docker command line to test some features with a fresh installation:
docker run --rm hello-world