Go to documentation repository
Page History
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.
Note | ||
---|---|---|
| ||
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:
- Run the command to view the list of connected USB devices:
Example of information output about USB devices connected to the system:Code Block lsusb
Code Block 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:
Code Block nano /etc/systemd/system/guardant-docker.service
Add the following lines to the file:
Code Block [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:
- Replace the Bus and Device values with the actual values from the output of the lsusb command.
- Instead of docker_IMAGE, specify the required Docker image (see Installing and launching Axxon One using Docker).
- Instead of CONTAINER_ID, specify the identifier of the container.
For example:Code Block [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
- Run the following commands to activate autostart:
Code Block 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.