blob: d1c94801db239b98be55b91f1eab4f450623ad6a [file] [log] [blame]
Kiran Kaminenic2a9c272018-05-08 16:24:28 -07001FROM ubuntu:xenial
2
3RUN 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 gcc \
21 g++ \
22 m4 \
23 wget \
24 liburiparser-dev \
25 libssl-dev \
26 pandoc
27
28RUN apt-get -y install libgcrypt20-dev
29
30RUN git clone https://github.com/tpm2-software/tpm2-tss.git
31RUN git clone https://github.com/tpm2-software/tpm2-abrmd.git
32RUN git clone https://github.com/tpm2-software/tpm2-tools.git
33
34RUN cd tpm2-tss && \
35 git checkout 1.2.0 && \
36 ./bootstrap && \
37 ./configure && \
38 make && \
39 make install
40
41RUN cd tpm2-abrmd && \
42 git checkout 1.1.1 && \
43 useradd --system --user-group tss && \
44 ./bootstrap && \
45 ./configure --with-dbuspolicydir=/etc/dbus-1/system.d \
46 --with-udevrulesdir=/etc/udev/rules.d/ \
47 --with-systemdsystemunitdir=/lib/systemd/system && \
48 make && \
49 make install
50
51RUN cd tpm2-tools && \
52 git checkout 2.1.0 && \
53 ./bootstrap && \
54 ./configure --with-tcti-tabrmd=yes && \
55 make && \
56 make install
57
58RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/tpm2.conf && \
59 ldconfig
60
61ADD entrypoint.sh /entrypoint.sh
62ENTRYPOINT ["/entrypoint.sh"]