mirror of
https://github.com/upa/mscp.git
synced 2026-02-04 11:34:44 +08:00
25 lines
680 B
Plaintext
25 lines
680 B
Plaintext
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
|
|
|