Access Host Services from Containers on Windows Server 2016

Occasionally it is necessary to access services running on the host machine from a container. You may be inclined to use localhost to reach the host, but this will not work as the container itself is localhost. Here is how to access host services from a container running on Windows Server 2016. This applies to containers running with NAT networking mode. This is the default, so unless you explicitly use something else, this should work for you. ...

January 31, 2017 · Jeppe Lund Andersen

Accessing a Running Windows Server 2016 Container

Occasionally it can be useful to access a running container. On Linux it is possible to open a bash session with a new instance of the container’s shell with docker exec -it [containername] bash. Because the Docker interface works the same way on Windows it is surprisingly easy to open a command prompt for a running container. Simply execute docker exec -it [containername] cmd. When you want to exit again, just use the exit command. ...

December 18, 2016 · Jeppe Lund Andersen

Access Docker Registry with Self-Signed Certificate on Windows Server 2016

With Windows Server 2016 available it’s time to find out all the little details when using Docker to administrate containers. A common scenario is accessing a private/internal hosted Docker Registry protected with a self-signed certificate (Details). Here is how you enable the Docker daemon and CLI on Windows Server 2016 to use your certificate when talking to the registry. Have your certificate (.crt) file available on the server Copy it to C:\ProgramData\docker\certs.d\[hostname][port]\ca.crt Example with internal registry on DNS and port myinternalregistry:5000: ...

October 26, 2016 · Jeppe Lund Andersen

Visual Studio Online Build - Building and Pushing Docker Images

In this article we will look at an example of how to build docker images and pushing to a Docker registry using the new cross-platform Visual Studio Online Build. As the running example we will take a small Node.js application, push it to a Git repository and have VSO build take over from there. The goal is to show how to build a docker image and push it to Docker Hub with a Linux build agent. A different machine acting as a web server can then spin up a container from the image a few seconds after. ...

October 10, 2015 · Jeppe Lund Andersen