summaryrefslogtreecommitdiffstats
path: root/bin/base/xenialdockerfile
diff options
context:
space:
mode:
authorManjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>2018-08-01 16:52:39 -0700
committerManjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>2018-08-16 17:05:11 -0700
commit7cdc066cfc45670ae2c0bcd088d54a9e45d60095 (patch)
treefd97ec54623c414bc4f6d72e6a1d3ffcdc35f2ef /bin/base/xenialdockerfile
parentc5bc5aae60f1bd4e0c0ed61d909cd41cdc20abe2 (diff)
Base images build and dockerfiles
This patch provides a build script that can be triggered by jenkins job to build base containers for AAF. Change-Id: I029784e7adbd7076967b756c23678b562438e06f Issue-ID: AAF-418 Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>
Diffstat (limited to 'bin/base/xenialdockerfile')
-rw-r--r--bin/base/xenialdockerfile102
1 files changed, 102 insertions, 0 deletions
diff --git a/bin/base/xenialdockerfile b/bin/base/xenialdockerfile
new file mode 100644
index 0000000..f28ed0f
--- /dev/null
+++ b/bin/base/xenialdockerfile
@@ -0,0 +1,102 @@
+FROM ubuntu:xenial
+
+RUN apt-get -y update && \
+ apt-get -y install \
+ autoconf \
+ autoconf-archive \
+ libglib2.0-dev \
+ libdbus-1-dev \
+ automake \
+ libtool \
+ autotools-dev \
+ libcppunit-dev \
+ p11-kit \
+ libcurl4-gnutls-dev \
+ libcmocka0 \
+ libcmocka-dev \
+ build-essential \
+ git \
+ pkg-config \
+ vim \
+ gcc \
+ g++ \
+ m4 \
+ curl \
+ wget \
+ liburiparser-dev \
+ libssl-dev \
+ pandoc \
+ softhsm2 \
+ opensc \
+ default-jdk
+
+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 cd tpm2-tss && \
+ git checkout 1.2.0 && \
+ ./bootstrap && \
+ ./configure && \
+ make && \
+ make install
+
+RUN cd tpm2-abrmd && \
+ git checkout 1.1.1 && \
+ 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 && \
+ make && \
+ make install
+
+RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/tpm2.conf && \
+ ldconfig
+
+# 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
+
+# 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
+
+RUN mkdir tpm-util
+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 sshsm