|Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux. Docker uses resource isolation features of the Linux kernel such as cgroups and kernel namespaces to allow independent "containers" to run within a single Linux instance, avoiding the overhead of starting virtual machines.
The latest Docker version can be downloaded from: http://www.docker.com
Configure Docker daemon to listen to network port instead of local Unix socket
Operating system used
Windows Vista Home Premium SP 2
Docker on Windows
- Check if Docker is installed/running, type: docker -v
You should see:
Docker version 1.5.0, build a8a31ef
- Switch to root user, type: sudo su
- Check if Docker is not listening to network port, type: netstat -tlp
Note: tlp = tcp listening program
The PID/Program name is showing "1259/sshd", thus there are no Docker program listening on the network ports.
- Write down your Docker ip address, type: ifconfig
In this example write down the eth0 address: 192.168.1.67
- Stop Docker, type: service docker stop
You should see:
- Start Docker and let it listen to your network port, type: docker -H 192.168.1.67:2375 -d &
- Port 2375 is standard Docker non SSL port.
- -d set in daemon mode
Note: Press the Enter key to get the prompt back.
- Check if Docker is listening to network port, type: netstat -tlp
The PID/Program name is showing "1987/docker", thus Docker is listening to network port.
- If you type: docker info or docker version, these commands will fail because the Docker client still communicates with the Docker daemon via the local Unix socket, instead of network port (in this example: 192.168.1.67:2375).
To fix this, type: export DOCKER_HOST="tcp://192.168.1.67:2375"
Now the Docker client communicates with the Docker daemon via the network port.
If you want to undo this step, type: export DOCKER_HOST=
- If you want the Docker daemon to listen to the network port AND to the local Unix socket, type:
docker -H 192.168.1.67:2375 -H unix:///var/run/docker.sock -d &