1

I have a bunch of heterogenous services using sockets and REST that are being restarted by hand. There are 5 machines currently running vmware images of Windows we'll call NODES. Each NODE needs to run a few of these services.. let's pick one service we'll call SRV, that specifically needs access a USB device on the machine..

I want to start simple, and dockerize this SRV first.. but the orchestration has me stuck.

I am thinking Docker Swarm could bring up 5 instances of SRV, one for each NODE .. but how do I specify this (or can I?) Is DCOS another option for this? All will run Windows 10 if that matters.

1 Answer 1

1

You can use any container orchestration solution like Docker swarm.The catch is how to ensure that the container has access to host system USB devices. For this, for plain docker commands, pass the option: --device=/dev/ttyUSB0

With docker run commands.

For docker swarm, there is no service for devices. You’ll have to use the option: --mount type=bind

With docker service create commands. For example:

docker service create --mount type=bind,source=/dev/ttyUSB0,target=/dev/ttyUSB0

From the container, you can the control and make use of the device. You’ll have to replace /dev/ttyUSB0 with your actual PCI device path.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .