-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (22 loc) · 915 Bytes
/
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
29
30
FROM registry.primekey.com/primekey/hsm-driver-base:0.4.20-29
LABEL maintainer="Bastian Fredriksson"
USER 0:0
WORKDIR /
RUN microdnf install tar && \
microdnf install python3-pip && \
pip3 install jinja2-cli
COPY ./PrimusAPI_PKCS11-X-*-rhel8-x86_64.tar.gz /root
COPY ./start.sh /usr/bin
COPY ./primus.cfg.j2 /root
RUN tar -xf /root/PrimusAPI_PKCS11-X-*-rhel8-x86_64.tar.gz && \
rm /root/PrimusAPI_PKCS11-X-*-rhel8-x86_64.tar.gz && \
ln -s /usr/local/primus/bin/ppin /usr/bin/ppin && \
ln -s /usr/local/primus/lib/libprimusP11.so.1 /usr/lib64/libprimusP11.so && \
ln -s /usr/local/primus/lib/libprimusP11.so.1 /usr/lib64/libprimusP11.so.1 && \
chmod +x /usr/bin/start.sh
# Required by hsm-driver-base
ENV HSM_PKCS11_LIBRARY=/usr/local/primus/lib/libprimusP11.so
VOLUME /opt/primekey/p11proxy-client
EXPOSE 7121
ENV PKCS11_DAEMON_SOCKET="tcp://0.0.0.0:7121"
CMD /usr/bin/start.sh