summaryrefslogtreecommitdiff
path: root/ci/docker/xenial
blob: 67867edc63e3e2d5489d4bdca5cd1ef15f9a3cbf (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
FROM ubuntu:xenial AS apt
RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        bzip2 \
        clang \
        cmake \
        curl \
        gcc \
        git \
        krb5-user \
        libcurl4-gnutls-dev \
        libgcrypt20-dev \
        libkrb5-dev \
        libpcre3-dev \
        libssl-dev \
        libz-dev \
        make \
        ninja-build \
        openjdk-8-jre-headless \
        openssh-server \
        openssl \
        pkgconf \
        python \
        sudo \
        valgrind \
        && \
    rm -rf /var/lib/apt/lists/*

FROM apt AS mbedtls
RUN cd /tmp && \
    curl --location --silent --show-error https://tls.mbed.org/download/mbedtls-2.16.2-apache.tgz | \
    tar -xz && \
    cd mbedtls-2.16.2 && \
    scripts/config.pl set MBEDTLS_MD4_C 1 && \
    CFLAGS=-fPIC cmake -G Ninja -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . && \
    ninja install && \
    cd .. && \
    rm -rf mbedtls-2.16.2

FROM mbedtls AS libssh2
RUN cd /tmp && \
    curl --insecure --location --silent --show-error https://www.libssh2.org/download/libssh2-1.8.2.tar.gz | \
    tar -xz && \
    cd libssh2-1.8.2 && \
    CFLAGS=-fPIC cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCRYPTO_BACKEND=Libgcrypt . && \
    ninja install && \
    cd .. && \
    rm -rf libssh2-1.8.2

FROM libssh2 AS valgrind
RUN cd /tmp && \
    curl --insecure --location --silent --show-error https://sourceware.org/pub/valgrind/valgrind-3.15.0.tar.bz2 | \
    tar -xj && \
    cd valgrind-3.15.0 && \
    ./configure && \
    make && \
    make install && \
    cd .. && \
    rm -rf valgrind-3.15.0

FROM valgrind AS configure
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod a+x /usr/local/bin/entrypoint.sh
RUN mkdir /var/run/sshd

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]