我需要从在Kubernetes中运行的docker容器访问USB设备。为此,我需要在内部具有驱动程序的映像。我还需要保证已安装了OpenJDK 8 64位来运行该应用程序。我正在使用OpenJDK:alpine基本映像这是我在主机上的安装方式:
sudo apt-get install pcscd
sudo apt-get install pcsc-tools // same as pcsc-lite
// For OMNIKEY for driver Then unpack the file and run the installer:
cd /home/cccam/ifdokccid_lnx_x64-3.7.0/
chmod 755 install
sudo ./install
在没有安装驱动程序并且未使用hostPath卷访问映像的情况下对其进行了尝试,
答案 0 :(得分:1)
我亲爱的沃森小学!只需将脚本作为命令运行:
FROM openjdk:11
VOLUME /tmp
RUN
sudo apt-get install pcscd
sudo apt-get install pcsc-tools
ARG DEPENDENCY=target/dependency
ENTRYPOINT ["java","-
cp","app:app/lib/*","com.mygroup.myapp.MyApp" . ]