diff --git a/ykpersonalize/Dockerfile b/ykpersonalize/Dockerfile index 35ddd07..6291d42 100644 --- a/ykpersonalize/Dockerfile +++ b/ykpersonalize/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update && apt-get install -y \ libjson0 \ libusb-1.0-0 \ libyubikey0 \ + pcscd \ usbutils \ yubico-piv-tool \ && rm -rf /var/lib/apt/lists/* @@ -43,4 +44,7 @@ RUN buildDeps=' \ WORKDIR /root/ +COPY entrypoint.sh /usr/local/bin/ + +ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] CMD [ "ykpersonalize", "--help" ] diff --git a/ykpersonalize/entrypoint.sh b/ykpersonalize/entrypoint.sh new file mode 100755 index 0000000..6bc3b42 --- /dev/null +++ b/ykpersonalize/entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +init(){ + local pcscd_running=$(ps -aux | grep [p]cscd) + if [ -z "$pcscd_running" ]; then + echo "starting pcscd in backgroud" + pcscd --debug --apdu + pcscd --hotplug + else + echo "pcscd is running in already: ${pcscd_running}" + fi +} + +init + +"$@" diff --git a/yubikey/Dockerfile b/yubikey/Dockerfile index acf0757..5c50c17 100644 --- a/yubikey/Dockerfile +++ b/yubikey/Dockerfile @@ -19,7 +19,7 @@ RUN apt-get update && apt-get install -y \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/* -ENV CCID_VERSION 1.4.20 +ENV CCID_VERSION 1.4.21 ENV PCSC_LITE_VERSION 1.8.14 ENV YUBIKEY_PIV_TOOL_VERSION 1.1.0 RUN buildDeps=' \ @@ -71,6 +71,8 @@ RUN buildDeps=' \ && cd ~ && rm -rf /usr/src/yubico-piv-tool* \ && apt-get purge -y --auto-remove $buildDeps -COPY testsign.sh /usr/local/bin/testsign.sh +COPY testsign.sh /usr/local/bin/ +COPY entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] CMD ["/usr/local/bin/testsign.sh"]