I’ve had to set up a couple instances of PhotonOS in my testing remote docker with test-kitchen. Here are my notes on how to get the PhotonOS prep’d and allowing for remote connections.

First you need to enable PermitRootLogin yes at the bottom of the file:

root@photon-iso [ ~ ]# vi /etc/ssh/sshd_config

After that you need to allow for iptables to open the port for the docker process:

root@photon-iso [ ~ ]# iptables -A INPUT -p tcp --dport 2375 -j ACCEPT

Then you need to edit /etc/default/docker to enable remote connections:

DOCKER_OPTS="-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"

Then start the process!

root@photon-iso [ ~ ]# systemctl start docker

You can verify your connection with a remote machine via:

$ DOCKER_HOST=tcp://IPOFMACHINE:2375 docker info