VMWare released “Photon” earlier this week, which is a lightweight Linux OS for hosting Docker containers. It’s amazingly slim like CoreOS and deploys in a matter of seconds. I gave it a spin today and it worked pretty well. Installing it on vSphere was pretty straightforward following documentation on the Photon GitHub site. Once it was installed, I needed to make a few changes to get it working smoothly.
Setting the proxy
If your environment uses a proxy to connect to the internet, continue with this section. If not, skip.
First, create a new directory to store the extra configuration.
|
|
Next, create a http-proxy.conf
file in the directory and edit it.
|
|
Add the following information to the file (substituting where necessary) and save with Ctrl + X
.
|
|
Reload the systemd
daemon and restart Docker.
|
|
Docker now has access to the internet.
Allow Docker connection via TCP
By default, Docker only allows connection through UNIX sockets. Since we will be controlling it via the Windows client, we need TCP access.
Open up the Docker service file in nano
|
|
Edit the Service -> ExecStart
line to allow TCP connections by changing:
|
|
to
|
|
Reload the systemd
daemon and restart Docker.
|
|
Upgrade the Docker binary
Photon comes with Docker 1.5.0 but unfortunately the Windows client only works with 1.6.0 and above.
If you are using a corporate proxy, you will first need to set the http_proxy
environmental variable so wget
works
|
|
Download the Docker 1.6.0 binary
|
|
Move the binary to /bin/
and mark it as executable
|
|
You will now have Docker 1.6.0 running.
Connecting from Windows
Download Docker 1.6.0 for Windows from Docker.com - 32-bit or 64-bit and open PowerShell in that directory. At this point I recommend renaming the file to docker.exe
.
To connect to the Photon host, run the following:
|
|
This will show information about the Docker host like so:
|
|
You are now connected!