Upgrade Duplicate utility to the latest tss
[aaf/sshsm.git] / bin / base / openssldockerfile
1 FROM ubuntu:xenial
2
3 RUN apt-get -y update && \
4   apt-get -y install \
5     autoconf \
6     autoconf-archive \
7     libglib2.0-dev \
8     libdbus-1-dev \
9     automake \
10     libtool \
11     autotools-dev \
12     libcppunit-dev \
13     p11-kit \
14     libcurl4-gnutls-dev \
15     libcmocka0 \
16     libcmocka-dev \
17     build-essential \
18     git \
19     pkg-config \
20     vim \
21     gcc \
22     g++ \
23     m4 \
24     curl \
25     wget \
26     liburiparser-dev \
27     libssl-dev \
28     pandoc \
29     opensc \
30     default-jdk
31
32 RUN apt-get -y install libgcrypt20-dev
33
34 RUN git clone https://github.com/tpm2-software/tpm2-tss.git
35 RUN git clone https://github.com/tpm2-software/tpm2-abrmd.git
36 RUN git clone https://github.com/tpm2-software/tpm2-tools.git
37
38 RUN cd tpm2-tss && \
39   git checkout 1.2.0 && \
40   ./bootstrap && \
41   ./configure && \
42   make && \
43   make install
44 RUN rm -rf tpm2-tss
45
46 RUN cd tpm2-abrmd && \
47   git checkout 1.1.1 && \
48   useradd --system --user-group tss && \
49   ./bootstrap && \
50   ./configure --with-dbuspolicydir=/etc/dbus-1/system.d \
51     --with-udevrulesdir=/etc/udev/rules.d/ \
52     --with-systemdsystemunitdir=/lib/systemd/system && \
53   make && \
54   make install
55 RUN rm -rf tpm2-abrmd
56
57 RUN cd tpm2-tools && \
58   git checkout 2.1.0 && \
59   ./bootstrap && \
60   ./configure && \
61   make && \
62   make install
63 RUN rm -rf tpm2-tools
64
65 RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/tpm2.conf && \
66   ldconfig
67
68 RUN wget https://www.openssl.org/source/openssl-1.1.0.tar.gz
69 RUN gzip -d openssl-1.1.0.tar.gz
70 RUN tar -xvf openssl-1.1.0.tar
71 RUN cd openssl-1.1.0 && \
72     ./config && \
73     make && \
74     make install
75 RUN rm -rf openssl-1.1.0
76 RUN rm -rf openssl-1.1.0.tar
77 RUN rm -rf openssl-1.1.0.tar.gz
78
79 RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/openssl.conf && \
80   ldconfig
81 RUN openssl version -v