forked from tpm2-software/tpm2-software-container
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opensuse-leap.docker
84 lines (78 loc) · 2.24 KB
/
opensuse-leap.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
FROM opensuse/leap
RUN zypper ref
RUN zypper -n in \
curl \
libcmocka-devel \
net-tools \
git \
pkg-config \
gcc \
m4 \
libtool \
automake \
libgcrypt-devel \
openssl-devel \
glib2-devel \
wget \
doxygen \
clang \
pandoc \
lcov \
libcurl-devel \
vim \
clang7-checker \
python2-PyYAML \
python2 \
python2-cryptography \
sqlite3-devel \
dbus-1-devel \
dbus-1-x11 \
xz \
gzip \
which \
gcc-c++ \
iproute \
libtasn1-devel \
socat \
libseccomp-devel \
expect \
gawk \
net-tools-deprecated
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 --libdir=/usr/lib64 --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) CFLAGS="-I/usr/include/libseccomp/" \
&& 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