Debian Codegraph @

ci/docker/centos7

raw
1 ARG BASE=centos:7
2
3 FROM ${BASE} AS yum
4 RUN yum install -y \
5 which \
6 bzip2 \
7 git \
8 libarchive \
9 gcc \
10 gcc-c++ \
11 make \
12 openssl-devel \
13 openssh-server \
14 git-daemon \
15 java-1.8.0-openjdk-headless \
16 sudo \
17 python
18
19 FROM yum AS libssh2
20 RUN cd /tmp && \
21 curl --location --silent --show-error https://www.libssh2.org/download/libssh2-1.11.0.tar.gz | tar -xz && \
22 cd libssh2-1.11.0 && \
23 ./configure && \
24 make && \
25 make install && \
26 cd .. && \
27 rm -rf libssh-1.11.0
28
29 FROM libssh2 AS valgrind
30 RUN cd /tmp && \
31 curl --insecure --location --silent --show-error https://sourceware.org/pub/valgrind/valgrind-3.15.0.tar.bz2 | \
32 tar -xj && \
33 cd valgrind-3.15.0 && \
34 ./configure && \
35 make MAKEFLAGS="-j -l$(grep -c ^processor /proc/cpuinfo)" && \
36 make install && \
37 cd .. && \
38 rm -rf valgrind-3.15.0
39
40 FROM valgrind AS cmake
41 RUN cd /tmp && \
42 curl -L https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1.tar.gz | tar -xz && \
43 cd cmake-3.21.1 && \
44 ./configure && \
45 make && \
46 make install && \
47 cd .. && \
48 rm -rf cmake-3.21.1
49
50 FROM cmake AS adduser
51 ARG UID=""
52 ARG GID=""
53 RUN if [ "${UID}" != "" ]; then USER_ARG="--uid ${UID}"; fi && \
54 if [ "${GID}" != "" ]; then GROUP_ARG="--gid ${GID}"; fi && \
55 groupadd ${GROUP_ARG} libgit2 && \
56 useradd ${USER_ARG} --gid libgit2 --shell /bin/bash --create-home libgit2
57
58 FROM adduser AS configure
59 ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
60 RUN mkdir /var/run/sshd