Kiran Kamineni | c2a9c27 | 2018-05-08 16:24:28 -0700 | [diff] [blame] | 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 | gcc \ |
| 21 | g++ \ |
| 22 | m4 \ |
| 23 | wget \ |
| 24 | liburiparser-dev \ |
| 25 | libssl-dev \ |
| 26 | pandoc |
| 27 | |
| 28 | RUN apt-get -y install libgcrypt20-dev |
| 29 | |
| 30 | RUN git clone https://github.com/tpm2-software/tpm2-tss.git |
| 31 | RUN git clone https://github.com/tpm2-software/tpm2-abrmd.git |
| 32 | RUN git clone https://github.com/tpm2-software/tpm2-tools.git |
| 33 | |
| 34 | RUN cd tpm2-tss && \ |
| 35 | git checkout 1.2.0 && \ |
| 36 | ./bootstrap && \ |
| 37 | ./configure && \ |
| 38 | make && \ |
| 39 | make install |
| 40 | |
| 41 | RUN 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 | |
| 51 | RUN cd tpm2-tools && \ |
| 52 | git checkout 2.1.0 && \ |
| 53 | ./bootstrap && \ |
| 54 | ./configure --with-tcti-tabrmd=yes && \ |
| 55 | make && \ |
| 56 | make install |
| 57 | |
| 58 | RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/tpm2.conf && \ |
| 59 | ldconfig |
| 60 | |
| 61 | ADD entrypoint.sh /entrypoint.sh |
| 62 | ENTRYPOINT ["/entrypoint.sh"] |