mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
ykman
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
2c5a163ced
commit
dd0d53927e
|
@ -10,6 +10,7 @@ FROM ubuntu:16.04
|
|||
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
pcscd \
|
||||
software-properties-common \
|
||||
--no-install-recommends && \
|
||||
add-apt-repository ppa:yubico/stable && \
|
||||
|
@ -17,6 +18,11 @@ RUN apt-get update && apt-get install -y \
|
|||
yubikey-manager \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
|
||||
|
||||
WORKDIR /root/
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin/
|
||||
|
||||
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
||||
CMD [ "ykman", "--help" ]
|
||||
|
|
18
ykman/entrypoint.sh
Executable file
18
ykman/entrypoint.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
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
|
||||
|
||||
"$@"
|
Loading…
Reference in New Issue
Block a user