Skip to content

Conversation

@StefanScherer
Copy link
Contributor

I've tested Visualizer with Windows Server Insider 16278 and Docker 17.09.0-ce-rc2 which allows me to map the Windows named pipe \\.\pipe\docker_engine into a Windows container.
This is the equivalent to the Unix socket /var/run/docker.sock.

This PR adds the usage of the Windows named pipe if running on Windows.

My Dockerfile.insider to build the example image stefanscherer/visualizer-windows:insider that is also available on Docker Hub:

FROM stefanscherer/node-windows:8.4.0-insider

WORKDIR /app

# Only run npm install if these files change.
ADD ./package.json /app/package.json

# Install dependencies
RUN npm install --unsafe-perm=true

# Add the rest of the sources
ADD . /app

USER ContainerAdministrator
# Build the app
RUN npm run dist

# Number of milliseconds between polling requests. Default is 200.
ENV MS 200

EXPOSE 8080

CMD ["npm.cmd","start"]

After building the image and running it

docker run -v //./pipe/docker_engine://./pipe/docker_engine -d -p 8080:8080 stefanscherer/visualizer-windows:insider

The Visualizer is running and can monitor the services in the swarm. Only from time to time there are some connection problems to that named pipe. Here is a screenshot with some debug console.logs that shows that the most of the requests are successful.

visualizer-whoami-named-pipe

This problem may be related to microsoft/go-winio#67 which we found running Portainer with a Windows named pipe in a Windows container. So this is no problem of the Visualizer itself.

/cc @friism

@ManoMarks ManoMarks merged commit db87799 into dockersamples:master Sep 24, 2017
@StefanScherer StefanScherer deleted the use-windows-named-pipe branch September 25, 2017 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants