Cleanup unused jar file
[aaf/sshsm.git] / bin / caservicecontainer / dockerfile
1
2 # Base Image for the build
3 FROM rmannfv/aaf-base:xenial
4
5 # Files required for the Java application
6 RUN wget https://www.bouncycastle.org/download/bcprov-jdk15on-159.jar
7 RUN wget https://www.bouncycastle.org/download/bcpkix-jdk15on-159.jar
8 RUN wget https://www.bouncycastle.org/download/bcmail-jdk15on-159.jar
9 RUN wget https://www.bouncycastle.org/download/bcpg-jdk15on-159.jar
10 RUN wget https://www.bouncycastle.org/download/bctls-jdk15on-159.jar
11 RUN cp ./bcpkix-jdk15on-159.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/
12 RUN cp ./bcprov-jdk15on-159.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/
13 RUN cp ./bcmail-jdk15on-159.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/
14 RUN cp ./bcpg-jdk15on-159.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/
15 RUN cp ./bctls-jdk15on-159.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext
16
17 # Clone the sshsm repo
18 RUN git clone https://gerrit.onap.org/r/aaf/sshsm
19
20 # Build SoftHSMv2
21 RUN cd sshsm && \
22   cd SoftHSMv2 && \
23   sh autogen.sh && \
24   ./configure --disable-gost && \
25   make && \
26   make install
27
28 # Create the directory for mounting the shared voulme
29 RUN mkdir -p /tmp/files
30
31 # Build TPM-Plugin
32 RUN cd sshsm && \
33   chmod 755 TPM2-Plugin/ && \
34   cd TPM2-Plugin && \
35   chmod 755 bootstrap && \
36   sleep 2 && \
37   ./bootstrap && \
38   ./configure && \
39   make && \
40   make install && \
41   ldconfig && \
42   export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
43
44 RUN cd sshsm && \
45   cd tpm-util && \
46   cd import && \
47   make -f sampleMakefile
48
49 COPY ./test.sh /