forked from tpm2-software/tpm2-software-container
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ubuntu-16.04.docker
91 lines (83 loc) · 2.47 KB
/
ubuntu-16.04.docker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
FROM ubuntu:16.04
RUN apt-get update && \
apt-get install -y \
autoconf-archive \
curl \
libcmocka0 \
libcmocka-dev \
net-tools \
build-essential \
git \
pkg-config \
gcc \
g++ \
m4 \
libtool \
automake \
libgcrypt20-dev \
libssl-dev \
autoconf \
gnulib \
wget \
doxygen \
libdbus-1-dev \
libglib2.0-dev \
clang-6.0 \
clang-tools-6.0 \
pandoc \
lcov \
libcurl4-openssl-dev \
dbus-x11 \
python-yaml \
python3-yaml \
vim-common \
python3-pip \
libsqlite3-dev \
python-cryptography \
python3-cryptography \
libtasn1-6-dev \
socat \
libseccomp-dev \
expect \
gawk
RUN pip3 install cpp-coveralls
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 100
RUN update-alternatives --install /usr/bin/scan-build scan-build /usr/bin/scan-build-6.0 100
ARG autoconf_archive=autoconf-archive-2018.03.13
WORKDIR /tmp
RUN wget --quiet --show-progress --progress=dot:giga "http://mirror.kumi.systems/gnu/autoconf-archive/$autoconf_archive.tar.xz" \
&& tar -xf $autoconf_archive.tar.xz \
&& rm $autoconf_archive.tar.xz \
&& cd $autoconf_archive \
&& ./configure --prefix=/usr \
&& make -j $(nproc) && make install
RUN rm -fr $autoconf_archive.tar.xz
ARG ibmtpm_name=ibmtpm1119
WORKDIR /tmp
RUN wget --quiet --show-progress --progress=dot:giga "https://downloads.sourceforge.net/project/ibmswtpm2/$ibmtpm_name.tar.gz" \
&& sha256sum $ibmtpm_name.tar.gz | grep ^b9eef79904e276aeaed2a6b9e4021442ef4d7dfae4adde2473bef1a6a4cd10fb \
&& mkdir -p $ibmtpm_name \
&& tar xvf $ibmtpm_name.tar.gz -C $ibmtpm_name \
&& rm $ibmtpm_name.tar.gz
WORKDIR $ibmtpm_name/src
RUN CFLAGS="-I/usr/local/openssl/include" make -j$(nproc) \
&& cp tpm_server /usr/local/bin
RUN rm -fr $ibmtpm_name/src $ibmtpm_name.tar.gz
WORKDIR /tmp
RUN git clone https://github.com/stefanberger/libtpms.git
RUN cd libtpms \
&& ./autogen.sh --prefix=/usr --with-openssl --with-tpm2 \
&& make -j$(nproc) \
&& make install
WORKDIR /tmp
RUN git clone https://github.com/stefanberger/swtpm.git
RUN cd swtpm \
&& ./autogen.sh --prefix=/usr \
&& make -j$(nproc) \
&& make install
ARG uthash="2.1.0"
WORKDIR /tmp
RUN wget --quiet --show-progress --progress=dot:giga "https://github.com/troydhanson/uthash/archive/v${uthash}.tar.gz" \
&& tar -xf v${uthash}.tar.gz \
&& cp uthash-${uthash}/src/*.h /usr/include/
RUN rm -rf uthash-${uthash}/ v${uthash}.tar.gz