mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
3e0fc7968f
Signed-off-by: Jess Frazelle <acidburn@google.com>
36 lines
965 B
Docker
36 lines
965 B
Docker
FROM golang:latest
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
sqlite3 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ENV SOFTHSM_VERSION 2.2.0
|
|
|
|
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 --depth 1 --branch "${SOFTHSM_VERSION}" 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"]
|