Skip to content

Commit 5382327

Browse files
authored
Adds the Dockerfile to build and install the oath-tool (#1)
* add changelog and readme * Add dockerfile * Add Dockerfile and Changelog
1 parent 30d3ab9 commit 5382327

File tree

4 files changed

+46
-1
lines changed

4 files changed

+46
-1
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Emacs temp files
2+
\#*
3+
*~

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Oathtool Dockerfile Changelog
2+
==============================
3+
1.0.0 - 06/22/2017
4+
------------------
5+
### Features
6+
- Builds and installs the oath-tool from source

Dockerfile

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

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
# docker-oathtool
2-
An Ubuntu base image that builds and installs the oath-tool
2+
A Debian based Docker image that builds and installs the oath-tool.
3+
The oath tool tarball's signature is verified before compiling.
4+
5+
## Docker Tagging Convention
6+
The images should be tagged in the format of:
7+
8+
```
9+
opengovorg/oathtool:<oath-tool version>
10+
```

0 commit comments

Comments
 (0)