Go to documentation repository
Documentation for Axxon One 2.0. Documentation for other versions of Axxon One is available too.
Previous page Next page
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.
Attention!
Before you start, make sure that the Guardant key is compatible with Linux OS. GNU/Linux native support is implemented for the models:
- Guardant Sign;
- Guardant Time;
- Guardant Code;
- As well as for the network versions of the above models.
Models that aren’t supported:
- Guardant Stealth III / Net III;
- Guardant Stealth II USB / Net II USB.
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:
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:
- 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:[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:
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.