-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
28 lines (23 loc) · 1.2 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM debian:stretch
# Install the build tools
RUN apt-get update --assume-yes && \
apt-get install -o 'Dpkg::Options::=--force-confnew' -y --force-yes -q gpg wget build-essential && \
apt-get autoclean
# Build and Install, verifies the signature
RUN mkdir /tmp/oathtool && cd /tmp/oathtool && \
wget http://download.savannah.nongnu.org/releases/oath-toolkit/oath-toolkit-2.6.2.tar.gz && \
wget http://download.savannah.nongnu.org/releases/oath-toolkit/oath-toolkit-2.6.2.tar.gz.sig && \
gpg --keyserver hkp://pgp.mit.edu --recv-key 860B7FBB32F8119D && \
gpg --verify oath-toolkit-2.6.2.tar.gz.sig oath-toolkit-2.6.2.tar.gz && \
tar -x -f oath-toolkit-2.6.2.tar.gz && cd oath-toolkit-2.6.2 && \
./configure --disable-shared --disable-pskc --disable-xmltest && \
make && make check && make install && \
cd ~/ && rm -rf /tmp/oathtool
# Create a non root user to run the oath-tool as
RUN useradd -ms /usr/bin/bash oath
USER oath
# Defaults to generating a TOTP token, provided that the user passes in the secret
ENTRYPOINT ["/usr/local/bin/oathtool", "--base32", "--totp"]
LABEL com.opengov.maintainer=OpenGov \
com.opengov.version=1.0.1