mirror of
https://github.com/upa/mscp.git
synced 2026-05-22 05:17:29 +08:00
install-build-deps.sh has --dont-install and --platform options.
All docker files do not call isntall-build-deps.sh. Instead, cmake passes REQUIREDPKGS to Dockerfiles, which is derived from the output of ./scripts/install-build-deps.sh --dont-install --platform PLATFORM. This change enables caching package installaion during docker build.
This commit is contained in:
22
Dockerfile/build-srpm.Dockerfile
Normal file
22
Dockerfile/build-srpm.Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM rockylinux:9
|
||||
|
||||
ARG REQUIREDPKGS
|
||||
ARG MSCP_VERSION
|
||||
|
||||
# install pytest, sshd for test, and rpm-build
|
||||
RUN set -ex && yum -y install ${REQUIREDPKGS} rpm-build rpmdevtools
|
||||
|
||||
ARG mscpdir="/mscp-${MSCP_VERSION}"
|
||||
ARG mscptgz="mscp-${MSCP_VERSION}.tar.gz"
|
||||
|
||||
COPY . ${mscpdir}
|
||||
|
||||
# prepare rpmbuild
|
||||
RUN rpmdev-setuptree \
|
||||
&& rm -rf ${mscpdir}/build \
|
||||
&& tar zcvf /${mscptgz} --exclude-vcs ${mscpdir} \
|
||||
&& cp /${mscptgz} ~/rpmbuild/SOURCES/ \
|
||||
&& cp ${mscpdir}/rpm/mscp.spec ~/rpmbuild/SPECS/
|
||||
|
||||
# build rpm and src.rpm
|
||||
RUN rpmbuild -ba ~/rpmbuild/SPECS/mscp.spec
|
||||
Reference in New Issue
Block a user