Connect to RPC Server in Docker

3.1k Views Asked by At

Getting started with docker for Windows. Would like to manage/monitor the stop the service in the container with a Services snap-in.

    FROM microsoft/windowsservercore
    EXPOSE 135 1024-65535

The container was run with

docker run -it --host-name rpc-test myrpc cmd

RPCSS Server works on the container.

sc query RPCSS

Still getting the error: 1722: The RPC server is unavailable

What I'm doing wrong?

1

There are 1 best solutions below

0
On

You need to set port with -p argument. EXPOSE doesn't open a port, it's an informational directive. Here is the documentation https://docs.docker.com/engine/reference/commandline/run/#publish-or-expose-port--p---expose

This exposes port 80 of the container without publishing the port to the host system’s interfaces.