DEV Community

Wincent Balin
Wincent Balin

Posted on • Originally published at ofdigitalwater.postach.io on

If you want to run Docker on local Linux box

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:

  1. Add user me to the group sudo on your future Docker host: usermod -a -G sudo me
  2. Remove password prompt when running sudo (as described here): Replace %sudo ALL=(ALL) ALL with %sudo ALL=(ALL) NOPASSWD: ALL
  3. 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.
  4. Activate the configuration in your current Docker environment: eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env computer1)
  5. 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.

Discussion (0)