Forwarding a Guardant USB key to a Docker container is the process when a physical device connected to the host machine becomes available inside a Docker container to work with.
Before you start, make sure that the Guardant key is compatible with Linux OS. GNU/Linux native support is implemented for the models:
Models that aren’t supported:
|
To forward a USB key to a Docker container, do the following:
lsusb |
Bus 001 Device 006: ID 0a89:0008 Aktiv Guardant Stealth 3 Sign/Time |
Memorize the Bus and Device values for the required device. In this example, they are 001 and 006.
Open the guardant-docker.service file for editing:
nano /etc/systemd/system/guardant-docker.service |
Add the following lines to the file:
[Service] Restart=always ExecStart=/usr/bin/docker run --rm --device=/dev/bus/usb/BUS value/Device docker_IMAGE value ExecStop=/usr/bin/docker stop CONTAINER_ID |
you must:
[Unit] Description=Start Docker container with Guardant USB After=network.target docker.service Requires=docker.service [Service] Restart=always ExecStart=/usr/bin/docker run --rm --device=/dev/bus/usb/001/006 ec03cff81943 ExecStop=/usr/bin/docker stop 71cfe3eb9019 [Install] WantedBy=multi-user.target |
sudo systemctl daemon-reload sudo systemctl enable guardant-docker.service sudo systemctl start guardant-docker.service |
Restart the operating system.
After you restart the operating system, the container starts automatically. The Guardant USB key is available inside the container, and it will be correctly detected by the system when creating a license, for example.