Debian Codegraph @

ci/docker/xenial

raw
1 ARG BASE=ubuntu:xenial
2
3 FROM ${BASE} AS apt
4 RUN apt-get update && \
5 DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
6 bzip2 \
7 clang \
8 cmake \
9 curl \
10 gettext \
11 gcc \
12 krb5-user \
13 libcurl4-gnutls-dev \
14 libexpat1-dev \
15 libgcrypt20-dev \
16 libintl-perl \
17 libkrb5-dev \
18 libpcre3-dev \
19 libssl-dev \
20 libz-dev \
21 make \
22 ninja-build \
23 openjdk-8-jre-headless \
24 openssh-server \
25 openssl \
26 pkgconf \
27 python \
28 sudo \
29 valgrind \
30 && \
31 rm -rf /var/lib/apt/lists/*
32
33 FROM apt AS git
34 RUN cd /tmp && \
35 curl --location --silent --show-error https://github.com/git/git/archive/refs/tags/v2.39.1.tar.gz | \
36 tar -xz && \
37 cd git-2.39.1 && \
38 make && \
39 make prefix=/usr install && \
40 cd .. && \
41 rm -rf git-2.39.1
42
43 FROM git AS mbedtls
44 RUN cd /tmp && \
45 curl --location --silent --show-error https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-2.16.2.tar.gz | \
46 tar -xz && \
47 cd mbedtls-mbedtls-2.16.2 && \
48 scripts/config.pl set MBEDTLS_MD4_C 1 && \
49 CFLAGS=-fPIC cmake -G Ninja -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . && \
50 ninja install && \
51 cd .. && \
52 rm -rf mbedtls-mbedtls-2.16.2
53
54 FROM mbedtls AS libssh2
55 RUN cd /tmp && \
56 curl --location --silent --show-error https://www.libssh2.org/download/libssh2-1.11.0.tar.gz | tar -xz && \
57 cd libssh2-1.11.0 && \
58 CFLAGS=-fPIC cmake -G Ninja -DBUILD_SHARED_LIBS=ON . && \
59 ninja install && \
60 cd .. && \
61 rm -rf libssh2-1.11.0
62
63 FROM libssh2 AS valgrind
64 RUN cd /tmp && \
65 curl --insecure --location --silent --show-error https://sourceware.org/pub/valgrind/valgrind-3.15.0.tar.bz2 | \
66 tar -xj && \
67 cd valgrind-3.15.0 && \
68 ./configure && \
69 make && \
70 make install && \
71 cd .. && \
72 rm -rf valgrind-3.15.0
73
74 FROM valgrind AS adduser
75 ARG UID=""
76 ARG GID=""
77 RUN if [ "${UID}" != "" ]; then USER_ARG="--uid ${UID}"; fi && \
78 if [ "${GID}" != "" ]; then GROUP_ARG="--gid ${GID}"; fi && \
79 groupadd ${GROUP_ARG} libgit2 && \
80 useradd ${USER_ARG} --gid libgit2 --shell /bin/bash --create-home libgit2
81
82
83 FROM adduser AS configure
84 RUN mkdir /var/run/sshd