diff --git a/yubico-piv-tool/Dockerfile b/yubico-piv-tool/Dockerfile index 90cbd48..d07fcf3 100644 --- a/yubico-piv-tool/Dockerfile +++ b/yubico-piv-tool/Dockerfile @@ -10,10 +10,14 @@ FROM debian:sid MAINTAINER Jessica Frazelle RUN apt-get update && apt-get install -y \ + pcscd \ usbutils \ yubico-piv-tool \ && rm -rf /var/lib/apt/lists/* WORKDIR /root/ +COPY entrypoint.sh /usr/local/bin/ + +ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] CMD [ "yubico-piv-tool", "--help" ] diff --git a/yubico-piv-tool/entrypoint.sh b/yubico-piv-tool/entrypoint.sh new file mode 100755 index 0000000..6bc3b42 --- /dev/null +++ b/yubico-piv-tool/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 6abdefa..acf0757 100644 --- a/yubikey/Dockerfile +++ b/yubikey/Dockerfile @@ -21,6 +21,7 @@ RUN apt-get update && apt-get install -y \ ENV CCID_VERSION 1.4.20 ENV PCSC_LITE_VERSION 1.8.14 +ENV YUBIKEY_PIV_TOOL_VERSION 1.1.0 RUN buildDeps=' \ autoconf \ bzip2 \ @@ -62,7 +63,7 @@ RUN buildDeps=' \ && cp src/92_pcscd_ccid.rules /etc/udev/rules.d/ \ && cd /usr/src && rm -rf /usr/src/ccid* \ && mkdir -p /usr/src/yubico-piv-tool \ - && curl -sSL "https://jesss.s3.amazonaws.com/tmp/yubico-piv-tool-1.0.2.tar.gz" | tar -xz -C /usr/src/yubico-piv-tool --strip-components 1 \ + && curl -sSL "https://s3.j3ss.co/tmp/yubico-piv-tool-${YUBIKEY_PIV_TOOL_VERSION}.tar.gz" | tar -xz -C /usr/src/yubico-piv-tool --strip-components 1 \ && cd /usr/src/yubico-piv-tool \ && ./configure --prefix="/usr" \ && make \