summaryrefslogtreecommitdiffstats
path: root/bin/base/openssldockerfile
blob: 6c323c4e0b9558d013d27c4a6e35874a2b86f370 (plain)
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
FROM ubuntu:xenial

RUN apt-get -y update && \
  apt-get -y install \
    autoconf \
    autoconf-archive \
    libglib2.0-dev \
    libdbus-1-dev \
    automake \
    libtool \
    autotools-dev \
    libcppunit-dev \
    p11-kit \
    libcurl4-gnutls-dev \
    libcmocka0 \
    libcmocka-dev \
    build-essential \
    git \
    pkg-config \
    vim \
    gcc \
    g++ \
    m4 \
    curl \
    wget \
    liburiparser-dev \
    libssl-dev \
    pandoc \
    opensc \
    default-jdk

RUN apt-get -y install libgcrypt20-dev

RUN git clone https://github.com/tpm2-software/tpm2-tss.git
RUN git clone https://github.com/tpm2-software/tpm2-abrmd.git
RUN git clone https://github.com/tpm2-software/tpm2-tools.git

RUN cd tpm2-tss && \
  git checkout 1.2.0 && \
  ./bootstrap && \
  ./configure && \
  make && \
  make install
RUN rm -rf tpm2-tss

RUN cd tpm2-abrmd && \
  git checkout 1.1.1 && \
  useradd --system --user-group tss && \
  ./bootstrap && \
  ./configure --with-dbuspolicydir=/etc/dbus-1/system.d \
    --with-udevrulesdir=/etc/udev/rules.d/ \
    --with-systemdsystemunitdir=/lib/systemd/system && \
  make && \
  make install
RUN rm -rf tpm2-abrmd

RUN cd tpm2-tools && \
  git checkout 2.1.0 && \
  ./bootstrap && \
  ./configure && \
  make && \
  make install
RUN rm -rf tpm2-tools

RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/tpm2.conf && \
  ldconfig

RUN wget https://www.openssl.org/source/openssl-1.1.0.tar.gz
RUN gzip -d openssl-1.1.0.tar.gz
RUN tar -xvf openssl-1.1.0.tar
RUN cd openssl-1.1.0 && \
    ./config && \
    make && \
    make install
RUN rm -rf openssl-1.1.0
RUN rm -rf openssl-1.1.0.tar
RUN rm -rf openssl-1.1.0.tar.gz

RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/openssl.conf && \
  ldconfig
RUN openssl version -v