centos8 1.46 KB
Newer Older
1
ARG BASE=centos:8
2

3 4 5 6 7
FROM ${BASE} AS stream
RUN dnf -y --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos && \
    dnf -y distro-sync

FROM stream AS yum
8 9
RUN yum install -y \
	which \
10
	bzip2 \
11 12 13 14 15 16 17 18 19 20
	git \
	libarchive \
	cmake \
	gcc \
	make \
	openssl-devel \
	openssh-server \
	git-daemon \
	java-1.8.0-openjdk-headless \
	sudo \
21 22 23
	python39 \
	krb5-workstation \
	krb5-libs
24 25 26

FROM yum AS libssh2
RUN cd /tmp && \
27
    curl --location --silent --show-error https://www.libssh2.org/download/libssh2-1.8.0.tar.gz | tar -xz && \
28 29 30
    cd libssh2-1.8.0 && \
    ./configure && \
    make && \
31 32 33
    make install && \
    cd .. && \
    rm -rf libssh2-1.8.0
34

35 36 37 38 39
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 && \
40
    ./configure && \
41 42 43 44 45 46
    make MAKEFLAGS="-j -l$(grep -c ^processor /proc/cpuinfo)" && \
    make install && \
    cd .. && \
    rm -rf valgrind-3.15.0

FROM valgrind AS adduser
47 48 49 50 51 52
ARG UID=""
ARG GID=""
RUN if [ "${UID}" != "" ]; then USER_ARG="--uid ${UID}"; fi && \
    if [ "${GID}" != "" ]; then GROUP_ARG="--gid ${GID}"; fi && \
    groupadd ${GROUP_ARG} libgit2 && \
    useradd ${USER_ARG} --gid libgit2 --shell /bin/bash --create-home libgit2
53 54 55 56

FROM adduser AS configure
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
RUN mkdir /var/run/sshd
57 58
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/local && \
    ldconfig