blob: 8557181bbac63ab27ea4a8045e9389ee87669f19 (
plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Base Image for the build
FROM rmannfv/aaf-base:xenial
RUN apt-get update
RUN apt-get install -y softhsm2
RUN apt-get install -y opensc
# Files required for the Java application
RUN wget https://www.bouncycastle.org/download/bcprov-jdk15on-159.jar
RUN wget https://www.bouncycastle.org/download/bcpkix-jdk15on-159.jar
RUN wget https://www.bouncycastle.org/download/bcmail-jdk15on-159.jar
RUN wget https://www.bouncycastle.org/download/bcpg-jdk15on-159.jar
RUN wget https://www.bouncycastle.org/download/bctls-jdk15on-159.jar
RUN wget https://www.bouncycastle.org/download/bctest-jdk15on-159.jar
RUN cp ./bcpkix-jdk15on-159.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/
RUN cp ./bcprov-jdk15on-159.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/
RUN cp ./bcmail-jdk15on-159.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/
RUN cp ./bcpg-jdk15on-159.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/
RUN cp ./bctls-jdk15on-159.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext
# Clone the sshsm repo
RUN git clone https://gerrit.onap.org/r/aaf/sshsm
# Build SoftHSMv2
RUN cd sshsm && \
cd SoftHSMv2 && \
sh autogen.sh && \
./configure --disable-gost && \
make && \
make install
# Create the directory for mounting the shared voulme
RUN mkdir -p /tmp/files
# Build TPM-Plugin
RUN cd sshsm && \
chmod 755 TPM2-Plugin/ && \
cd TPM2-Plugin && \
chmod 755 bootstrap && \
sleep 2 && \
./bootstrap && \
./configure && \
make && \
make install && \
ldconfig && \
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
RUN cd sshsm && \
cd tpm-util && \
cd import && \
make -f sampleMakefile
COPY ./test.sh /
|