entrypoint

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
This commit is contained in:
Jessica Frazelle 2015-11-02 18:24:15 -08:00
parent 622a01489c
commit 94b824f520
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3
3 changed files with 24 additions and 2 deletions

View File

@ -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" ]

16
ykpersonalize/entrypoint.sh Executable file
View File

@ -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
"$@"

View File

@ -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"]