diff options
Diffstat (limited to 'bin/base/xenialdockerfile')
-rw-r--r-- | bin/base/xenialdockerfile | 55 |
1 files changed, 33 insertions, 22 deletions
diff --git a/bin/base/xenialdockerfile b/bin/base/xenialdockerfile index 7915444..ec9d310 100644 --- a/bin/base/xenialdockerfile +++ b/bin/base/xenialdockerfile @@ -24,39 +24,44 @@ RUN apt-get -y update && \ curl \ wget \ liburiparser-dev \ - libssl-dev \ pandoc \ - softhsm2 \ opensc \ default-jdk +RUN wget https://www.openssl.org/source/openssl-1.1.0.tar.gz && \ + gzip -d openssl-1.1.0.tar.gz && \ + tar -xvf openssl-1.1.0.tar && \ + cd openssl-1.1.0 && \ + ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl && \ + make && \ + make install RUN apt-get -y install libgcrypt20-dev -RUN git clone https://github.com/tpm2-software/tpm2-tss.git -RUN git clone https://github.com/tpm2-software/tpm2-abrmd.git -RUN git clone https://github.com/tpm2-software/tpm2-tools.git +RUN apt-get -y install valgrind +RUN wget https://github.com/tpm2-software/tpm2-tss/releases/download/2.0.0/tpm2-tss-2.0.0.tar.gz +RUN tar -xvf tpm2-tss-2.0.0.tar.gz +RUN wget https://github.com/tpm2-software/tpm2-abrmd/releases/download/2.0.0/tpm2-abrmd-2.0.0.tar.gz +RUN tar -xvf tpm2-abrmd-2.0.0.tar.gz +RUN wget https://github.com/tpm2-software/tpm2-tools/releases/download/3.1.0/tpm2-tools-3.1.0.tar.gz +RUN tar -xvf tpm2-tools-3.1.0.tar.gz -RUN cd tpm2-tss && \ - git checkout 1.2.0 && \ - ./bootstrap && \ +RUN cd tpm2-tss-2.0.0 && \ ./configure && \ make && \ make install +RUN cp /tpm2-tss-2.0.0/src/util/tpm2b.h /usr/local/include/tss2/ -RUN cd tpm2-abrmd && \ - git checkout 1.1.1 && \ +RUN cd tpm2-abrmd-2.0.0 && \ useradd --system --user-group tss && \ - ./bootstrap && \ ./configure --with-dbuspolicydir=/etc/dbus-1/system.d \ --with-udevrulesdir=/etc/udev/rules.d/ \ --with-systemdsystemunitdir=/lib/systemd/system && \ make && \ make install -RUN cd tpm2-tools && \ - git checkout 2.1.0 && \ - ./bootstrap && \ - ./configure && \ +RUN cd tpm2-tools-3.1.0 && \ + export PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig && \ + ./configure --disable-hardening && \ make && \ make install @@ -69,8 +74,9 @@ RUN git clone https://gerrit.onap.org/r/aaf/sshsm # Build SoftHSMv2 RUN cd sshsm && \ cd SoftHSMv2 && \ + export LD_LIBRARY_PATH=/usr/local/ssl/lib && \ sh autogen.sh && \ - ./configure --disable-gost && \ + ./configure --disable-gost --with-openssl=/usr/local/ssl && \ make && \ make install @@ -81,11 +87,10 @@ RUN cd sshsm && \ chmod 755 bootstrap && \ sleep 2 && \ ./bootstrap && \ - ./configure && \ + ./configure LDFLAGS="-L/usr/local/ssl/lib" && \ make && \ make install && \ - ldconfig && \ - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib + ldconfig RUN cd sshsm && \ cd tpm-util && \ @@ -97,10 +102,16 @@ RUN cd tpm-util && \ mkdir bin RUN cp /sshsm/tpm-util/import/ossl_tpm_import /tpm-util/bin/ -RUN rm -rf tpm2-tss -RUN rm -rf tpm2-abrmd -RUN rm -rf tpm2-tools +RUN rm -rf tpm2-tss-2.0.0 +RUN rm -rf tpm2-tss-2.0.0.tar.gz +RUN rm -rf tpm2-abrmd-2.0.0 +RUN rm -rf tpm2-abrmd-2.0.0.tar.gz +RUN rm -rf tpm2-tools-3.1.0 +RUN rm -rf tpm2-tools-3.1.0.tar.gz RUN rm -rf sshsm +RUN rm -rf openssl-1.1.0 +RUN rm -rf openssl-1.1.0.tar +RUN rm -rf openssl-1.1.0.tar.gz RUN mkdir -p /sshsm/bin COPY ./import.sh /sshsm/bin |