Hash :
01a83406
Author :
Date :
2020-02-18T15:20:43
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
ARG BASE
FROM $BASE AS apt
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
clang \
cmake \
curl \
gcc \
git \
libcurl4-openssl-dev \
libpcre3-dev \
libssh2-1-dev \
libssl-dev \
libz-dev \
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 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 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"]