Skip to content

Commit

Permalink
ykman
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Nov 27, 2017
1 parent 2c5a163 commit dd0d539
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ykman/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@ FROM ubuntu:16.04
LABEL maintainer "Jessie Frazelle <[email protected]>"

RUN apt-get update && apt-get install -y \
pcscd \
software-properties-common \
--no-install-recommends && \
add-apt-repository ppa:yubico/stable && \
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 changes: 18 additions & 0 deletions ykman/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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

"$@"

0 comments on commit dd0d539

Please sign in to comment.