summaryrefslogtreecommitdiff
path: root/docker/Dockerfile-centos-8
blob: 8210eca198af12eec13b3f6a5063be54ab0bdfc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM centos:8

ARG mscpdir="/mscp"

COPY . ${mscpdir}

# from https://stackoverflow.com/questions/70963985/error-failed-to-download-metadata-for-repo-appstream-cannot-prepare-internal
RUN cd /etc/yum.repos.d/
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

RUN set -ex && yum -y update && yum -y install \
	rpm-build

RUN ${mscpdir}/install-build-deps.sh

RUN cd ${mscpdir}       \
        && rm -rf build

RUN cd ${mscpdir}       \
        && cmake -B build -DBUILD_PKG=1 \
        && cd ${mscpdir}/build          \
	&& cpack -G RPM CPackConfig.cmake