bionic 1.19 KB
Newer Older
1 2
ARG BASE=ubuntu:bionic
FROM ${BASE} AS apt
3
RUN apt-get update && \
4
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
5 6 7
        clang \
        cmake \
        curl \
8
        gcc \
9
        git \
10
        krb5-user \
11
        libcurl4-openssl-dev \
12
        libkrb5-dev \
13
        libpcre3-dev \
14 15 16
        libssh2-1-dev \
        libssl-dev \
        libz-dev \
17
        ninja-build \
18
        openjdk-8-jre-headless \
19
        openssh-server \
20
        openssl \
21
        pkgconf \
22
        python \
23
        sudo \
24 25 26
        valgrind \
        && \
    rm -rf /var/lib/apt/lists/*
27

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

39
FROM mbedtls AS configure
40 41
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod a+x /usr/local/bin/entrypoint.sh
42
RUN mkdir /var/run/sshd
43

Edward Thomson committed
44
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]