mirror of
https://github.com/upa/mscp.git
synced 2026-02-24 00:44:44 +08:00
add install-build-deps.sh and fix docker build procedure
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
FROM centos:8
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG workdir="/"
|
||||
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/
|
||||
@@ -9,10 +10,15 @@ 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 \
|
||||
git cmake gcc make libssh-devel rpm-build
|
||||
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
|
||||
|
||||
RUN cd ${workdir} \
|
||||
&& git clone --depth=1 https://github.com/upa/mscp \
|
||||
&& mkdir mscp/build && cd mscp/build \
|
||||
&& cmake .. -DBUILD_PKG=1 \
|
||||
&& cpack -G RPM CPackConfig.cmake
|
||||
|
||||
Reference in New Issue
Block a user