If you would like to run Docker on a Linux box in your LAN, and you already configured the Linux box hostname as computer1 and a user account there as me, and your current Docker environment is Docker Toolbox on Windows together with docker-machine, perform the following steps:
- Add user me to the group sudo on your future Docker host:
usermod -a -G sudo me
- Remove password prompt when running
sudo
(as described here): Replace%sudo ALL=(ALL) ALL
with%sudo ALL=(ALL) NOPASSWD: ALL
- Run this command in your current Docker environment to install Docker on your future Docker host:
docker-machine create --driver generic --generic-ip-address computer1 --generic-engine-port 2375 --generic-ssh-user me computer1
. The last part is the name of the configuration in your current Docker environment. - Activate the configuration in your current Docker environment:
eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env computer1)
- Reverse step 2 and, if needed, also step 1
Then you are ready to use Docker on your computer1 box.
Perform step 4 to activate this configuration again.
Top comments (0)