-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jess Frazelle <[email protected]>
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
"$@" |