From 4f4b8aa0e61d367e2d06b55c2d7ad1419aae9665 Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Fri, 17 Jul 2015 11:15:49 -0700 Subject: [PATCH] add new golang softhsm2 Signed-off-by: Jessica Frazelle --- golang-softhsm2/Dockerfile | 33 +++++++++++++++++++++++++++++++++ golang-softhsm2/softhsm2.conf | 5 +++++ 2 files changed, 38 insertions(+) create mode 100644 golang-softhsm2/Dockerfile create mode 100644 golang-softhsm2/softhsm2.conf diff --git a/golang-softhsm2/Dockerfile b/golang-softhsm2/Dockerfile new file mode 100644 index 0000000..56019c7 --- /dev/null +++ b/golang-softhsm2/Dockerfile @@ -0,0 +1,33 @@ +FROM golang:1.4.2 + +RUN apt-get update && apt-get install -y \ + sqlite3 \ + && rm -rf /var/lib/apt/lists/* + +RUN buildDeps=' \ + autoconf \ + automake \ + build-essential \ + libtool \ + libssl-dev \ + libsqlite3-dev \ + ' \ + && set -x \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* \ + && git clone https://github.com/opendnssec/SoftHSMv2.git /usr/src/SoftHSMv2 \ + && cd /usr/src/SoftHSMv2 \ + && sh autogen.sh \ + && ./configure --with-objectstore-backend-db \ + && make \ + && make install \ + && rm -rf /usr/src/SoftHSMv2 \ + && apt-get purge -y --auto-remove $buildDeps \ + && mkdir -p /softhsm2/tokens + +# Default locations for the SoftHSM2 configuration and PKCS11 bindings +ENV SOFTHSM2_CONF="/etc/softhsm2/softhsm2.conf" +ENV LIBDIR="/usr/local/lib/softhsm/" +COPY ./softhsm2.conf /etc/softhsm2/softhsm2.conf + +ENTRYPOINT ["softhsm2-util"] diff --git a/golang-softhsm2/softhsm2.conf b/golang-softhsm2/softhsm2.conf new file mode 100644 index 0000000..775101f --- /dev/null +++ b/golang-softhsm2/softhsm2.conf @@ -0,0 +1,5 @@ +# SoftHSM v2 configuration file + +directories.tokendir = /softhsm2/tokens +objectstore.backend = db +log.level = INFO