Docker installing drivers and middleware into container

11/2/2019

I need to access a USB Device from a docker container running in Kubernetes. In order to do this I need to have an image with drivers inside. I also need to guarantee that I have OpenJDK 8 64 bit installed to run the app. I am using OpenJDK:alpine base image Here is how I install on a host:

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

Tried it without the drivers installed in the image and accessing using hostPath volumes and it does not work.

-- Average Bear
docker
jib
kubernetes

1 Answer

11/2/2019

Elementary my dear Watson! Just run the scripts as command:

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" .  ]
-- Average Bear
Source: StackOverflow