Проблема один в один как у Алексея Черенцова.
за базу взял образ на базе Ubuntu c 21 jdk
eclipse-temurin:21.0.2_13-jdk-jammy
#uname -a
Linux alex-dev 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux root@alex-dev:~#
запускаю с учетом вышенаписанных рекомендаций (dockec compose)
privileged: true
network_mode: host
volumes:
- "/dev/bus/usb:/dev/bus/usb:ro"
- "/run/udev:/run/udev:ro"
При сборке доустанавливаю следующие пакеты
RUN apt-get update && apt-get install -y usbutils udev libusb-0.1-4 libccid pcscd libpcsclite1 pcsc-tools dialog opensc debconf
далее если в лоб ставить драйвера
RUN dpkg -i ifd-rutokens_1.0.4_amd64.deb
не ставятся и образ не собирается
> [signer stage-1 5/10] RUN dpkg -i ifd-rutokens_1.0.4_amd64.deb:
0.107 Selecting previously unselected package ifd-rutokens.
0.114 (Reading database ... 27718 files and directories currently installed.)
0.114 Preparing to unpack ifd-rutokens_1.0.4_amd64.deb ...
0.116 Unpacking ifd-rutokens (1.0.4) ...
0.134 Setting up ifd-rutokens (1.0.4) ...
0.142 Failed to send reload request: No such file or directory
0.142 dpkg: error processing package ifd-rutokens (--install):
0.142 installed ifd-rutokens package post-installation script subprocess returned error exit status 1
0.146 Errors were encountered while processing:
0.146 ifd-rutokens
------
failed to solve: process "/bin/sh -c dpkg -i ifd-rutokens_1.0.4_amd64.deb" did not complete successfully: exit code: 1
поэтому поставил по совету oleg_jpeg
RUN dpkg --unpack ifd-rutokens_1.0.4_amd64.deb
RUN rm /var/lib/dpkg/info/ifd-rutokens.postinst
RUN dpkg --configure ifd-rutokens
потом в запущенном контейнере проверил
dpkg -l | grep ifd-rutokens
пакет установлен
далее в контейнере
/etc/init.d/pcscd start
pcsc_scan
даёт
Using reader plug'n play mechanism
Scanning present readers...
Waiting for the first reader... -
смотрю в режиме отладки - так же ошибка
/etc/init.d/pcscd stop
pcscd -afddddd
00000000 [137341524619776] debuglog.c:299:DebugLogSetLevel() debug level=debug
00000015 [137341524619776] debuglog.c:299:DebugLogSetLevel() debug level=debug
00000005 [137341524619776] debuglog.c:299:DebugLogSetLevel() debug level=debug
00000002 [137341524619776] debuglog.c:299:DebugLogSetLevel() debug level=debug
00000005 [137341524619776] debuglog.c:299:DebugLogSetLevel() debug level=debug
00000179 [137341524619776] configfile.l:293:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d
00000020 [137341524619776] configfile.l:329:DBGetReaderListDir() Skipping non regular file: ..
00000004 [137341524619776] configfile.l:329:DBGetReaderListDir() Skipping non regular file: .
00000005 [137341524619776] configfile.l:369:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin
00000042 [137341524619776] pcscdaemon.c:663:main() pcsc-lite 1.9.5 daemon ready.
00004771 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000140 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000131 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x046D, PID: 0xC077, path: /dev/bus/usb/001/002
00000133 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000153 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x0A89, PID: 0x0020, path: /dev/bus/usb/001/008
00000010 [137341524619776] hotplug_libudev.c:441:HPAddDevice() Adding USB device: Aktiv Co. Rutoken S
00000034 [137341524619776] readerfactory.c:1097:RFInitializeReader() Attempting startup of Aktiv Co. Rutoken S 00 00 using /usr/lib/pcsc/drivers/ifd-rutokens.bundle/Contents/Linux/librutokens.so
00000298 [137341524619776] readerfactory.c:972:RFBindFunctions() Loading IFD Handler 3.0
00110985 [137341524619776] readerfactory.c:1138:RFInitializeReader() Open Port 0x200000 Failed (usb:0a89)
00000013 [137341524619776] readerfactory.c:380:RFAddReader() Aktiv Co. Rutoken S init failed.
00000006 [137341524619776] readerfactory.c:632:RFRemoveReader() UnrefReader() count was: 1
00000003 [137341524619776] readerfactory.c:1151:RFUnInitializeReader() Attempting shutdown of Aktiv Co. Rutoken S 00 00.
00000006 [137341524619776] readerfactory.c:1009:RFUnloadReader() Unloading reader driver.
00000083 [137341524619776] hotplug_libudev.c:538:HPAddDevice() Failed adding USB device: Aktiv Co. Rutoken S
00000163 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000118 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x04F2, PID: 0x0116, path: /dev/bus/usb/001/003
00000094 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000100 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x8086, PID: 0x0808, path: /dev/bus/usb/001/004
00000111 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x8086, PID: 0x0808, path: /dev/bus/usb/001/004
00000101 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x8086, PID: 0x0808, path: /dev/bus/usb/001/004
00000171 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0003, path: /dev/bus/usb/002/001
00000210 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/003/001
00000210 [137341524619776] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0003, path: /dev/bus/usb/004/001
только одно НО - у Алексея в итоге с сетью host запустилось - у меня никак :(
ещё - момент с сетью непонятен, важно чтобы сеть оставалась та, что задана
сервис общается с БД и другими сервисами, которые именно в сети которую я задал в настройках ...