mirror of
https://github.com/upa/mscp.git
synced 2026-02-19 04:55:44 +08:00
bump up container image versions and drop using CPack
We have already provided DEB packages in launchpad PPA and RPM packages in COPR. Thus, we need no more deb/rpm packages in Github releases. The single binary build of mscp is an execptio. Updated container image versions: - almalinux 8.8 -> 9.3 - rocky 8.8 -> 8.9, and 9.3 is added - alpine 3.17 -> 3.19
This commit is contained in:
3
Dockerfile/.gitignore
vendored
Normal file
3
Dockerfile/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
# generated by cmake
|
||||
rpmbuild.Dockerfile
|
||||
19
Dockerfile/README.md
Normal file
19
Dockerfile/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
Dockerfiles for building and testing mscp.
|
||||
|
||||
Build container:
|
||||
|
||||
```
|
||||
docker build -t mscp-DIST:VER -f docker/DIST-VER.Dockerfile .
|
||||
```
|
||||
|
||||
Run test:
|
||||
|
||||
```
|
||||
docker run --init --rm mscp-DST:VER /mscp/scripts/test-in-container.sh
|
||||
```
|
||||
|
||||
`cmake` provides custom targets to build and test mscp in the
|
||||
containers. See `make docker-*` targets. `make docker-build-all`
|
||||
builds all container images and `make docker-test-all` runs the test
|
||||
in all container images.
|
||||
29
Dockerfile/almalinux-9.3.Dockerfile
Normal file
29
Dockerfile/almalinux-9.3.Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM almalinux:9.3
|
||||
|
||||
# install pytest, sshd for test, and rpm-build
|
||||
RUN set -ex && yum -y install \
|
||||
python3 python3-pip python3-devel openssh openssh-server openssh-clients rpm-build
|
||||
|
||||
RUN python3 -m pip install pytest
|
||||
|
||||
|
||||
# preparation for sshd
|
||||
RUN mkdir /var/run/sshd \
|
||||
&& ssh-keygen -A \
|
||||
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
||||
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||
|
||||
ARG mscpdir="/mscp"
|
||||
|
||||
COPY . ${mscpdir}
|
||||
|
||||
# install build dependency
|
||||
RUN ${mscpdir}/scripts/install-build-deps.sh
|
||||
|
||||
# build
|
||||
RUN cd ${mscpdir} \
|
||||
&& rm -rf build \
|
||||
&& cmake -B build \
|
||||
&& cd ${mscpdir}/build \
|
||||
&& make -j 2 \
|
||||
&& make install
|
||||
35
Dockerfile/alpine-3.19.Dockerfile
Normal file
35
Dockerfile/alpine-3.19.Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
FROM alpine:3.19
|
||||
|
||||
# Build mscp with conan to create single binary mscp
|
||||
|
||||
RUN apk add --no-cache \
|
||||
gcc make cmake python3 py3-pip perl linux-headers libc-dev \
|
||||
openssh bash python3-dev py3-pytest g++
|
||||
|
||||
RUN pip3 install --break-system-packages conan
|
||||
|
||||
# preparation for sshd
|
||||
RUN ssh-keygen -A
|
||||
RUN mkdir /var/run/sshd \
|
||||
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
||||
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||
|
||||
|
||||
# Build mscp as a single binary
|
||||
RUN conan profile detect --force
|
||||
|
||||
ARG mscpdir="/mscp"
|
||||
|
||||
COPY . ${mscpdir}
|
||||
|
||||
RUN cd ${mscpdir} \
|
||||
&& rm -rf build \
|
||||
&& conan install . --output-folder=build --build=missing \
|
||||
&& cd ${mscpdir}/build \
|
||||
&& cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \
|
||||
-DBUILD_CONAN=ON -DBUILD_STATIC=ON \
|
||||
&& make -j 2 \
|
||||
&& make install
|
||||
|
||||
20
Dockerfile/build-deb.Dockerfile
Normal file
20
Dockerfile/build-deb.Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates build-essential devscripts debhelper gcc make cmake
|
||||
|
||||
ARG mscpdir="/debbuild/mscp"
|
||||
|
||||
COPY . ${mscpdir}
|
||||
|
||||
# install build dependency
|
||||
RUN ${mscpdir}/scripts/install-build-deps.sh
|
||||
|
||||
# build
|
||||
RUN cd ${mscpdir} \
|
||||
&& debuild -us -uc \
|
||||
&& mv ${mscpdir} /
|
||||
|
||||
# Then all debuild output files exsit at /debbuild
|
||||
|
||||
22
Dockerfile/build-srpm.Dockerfile
Normal file
22
Dockerfile/build-srpm.Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM rockylinux:9
|
||||
|
||||
# install pytest, sshd for test, and rpm-build
|
||||
RUN set -ex && yum -y install rpm-build rpmdevtools
|
||||
|
||||
ARG mscpdir="/mscp-0.1.3"
|
||||
ARG mscptgz="mscp-0.1.3.tar.gz"
|
||||
|
||||
COPY . ${mscpdir}
|
||||
|
||||
# install build dependency
|
||||
RUN ${mscpdir}/scripts/install-build-deps.sh
|
||||
|
||||
# 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
|
||||
22
Dockerfile/build-srpm.Dockerfile.in
Normal file
22
Dockerfile/build-srpm.Dockerfile.in
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM rockylinux:9
|
||||
|
||||
# install pytest, sshd for test, and rpm-build
|
||||
RUN set -ex && yum -y install rpm-build rpmdevtools
|
||||
|
||||
ARG mscpdir="/mscp-@MSCP_VERSION@"
|
||||
ARG mscptgz="mscp-@MSCP_VERSION@.tar.gz"
|
||||
|
||||
COPY . ${mscpdir}
|
||||
|
||||
# install build dependency
|
||||
RUN ${mscpdir}/scripts/install-build-deps.sh
|
||||
|
||||
# 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
|
||||
29
Dockerfile/rocky-8.9.Dockerfile
Normal file
29
Dockerfile/rocky-8.9.Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM rockylinux:8.9
|
||||
|
||||
# install pytest, sshd for test, and rpm-build
|
||||
RUN set -ex && yum -y install \
|
||||
python3 python3-pip python3-devel openssh openssh-server openssh-clients rpm-build
|
||||
|
||||
RUN python3 -m pip install pytest
|
||||
|
||||
|
||||
# preparation for sshd
|
||||
RUN mkdir /var/run/sshd \
|
||||
&& ssh-keygen -A \
|
||||
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
||||
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||
|
||||
ARG mscpdir="/mscp"
|
||||
|
||||
COPY . ${mscpdir}
|
||||
|
||||
# install build dependency
|
||||
RUN ${mscpdir}/scripts/install-build-deps.sh
|
||||
|
||||
# build
|
||||
RUN cd ${mscpdir} \
|
||||
&& rm -rf build \
|
||||
&& cmake -B build \
|
||||
&& cd ${mscpdir}/build \
|
||||
&& make -j 2 \
|
||||
&& make install
|
||||
30
Dockerfile/rocky-9.3.Dockerfile
Normal file
30
Dockerfile/rocky-9.3.Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM rockylinux:9.3
|
||||
|
||||
# install pytest, sshd for test, and rpm-build
|
||||
RUN set -ex && yum -y install \
|
||||
python3 python3-pip python3-devel openssh openssh-server openssh-clients rpm-build
|
||||
|
||||
RUN python3 -m pip install pytest
|
||||
|
||||
|
||||
# preparation for sshd
|
||||
RUN mkdir /var/run/sshd \
|
||||
&& ssh-keygen -A \
|
||||
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
||||
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||
|
||||
ARG mscpdir="/mscp"
|
||||
|
||||
COPY . ${mscpdir}
|
||||
|
||||
# install build dependency
|
||||
RUN ${mscpdir}/scripts/install-build-deps.sh
|
||||
|
||||
# build
|
||||
RUN cd ${mscpdir} \
|
||||
&& rm -rf build \
|
||||
&& cmake -B build \
|
||||
&& cd ${mscpdir}/build \
|
||||
&& make -j 2 \
|
||||
&& make install
|
||||
|
||||
35
Dockerfile/ubuntu-20.04.Dockerfile
Normal file
35
Dockerfile/ubuntu-20.04.Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates
|
||||
|
||||
# install pytest, and sshd for test
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
python3 python3-pip python3-dev openssh-server
|
||||
|
||||
RUN python3 -m pip install pytest
|
||||
|
||||
|
||||
# preparation for sshd
|
||||
RUN mkdir /var/run/sshd \
|
||||
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
||||
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||
|
||||
|
||||
ARG mscpdir="/mscp"
|
||||
|
||||
COPY . ${mscpdir}
|
||||
|
||||
# install build dependency
|
||||
RUN ${mscpdir}/scripts/install-build-deps.sh
|
||||
|
||||
|
||||
# build
|
||||
RUN cd ${mscpdir} \
|
||||
&& rm -rf build \
|
||||
&& cmake -B build \
|
||||
&& cd ${mscpdir}/build \
|
||||
&& make -j 2 \
|
||||
&& make install
|
||||
|
||||
33
Dockerfile/ubuntu-22.04.Dockerfile
Normal file
33
Dockerfile/ubuntu-22.04.Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates
|
||||
|
||||
# install pytest, and sshd for test
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
python3 python3-pip python3-dev openssh-server
|
||||
|
||||
RUN python3 -m pip install pytest
|
||||
|
||||
|
||||
# preparation for sshd
|
||||
RUN mkdir /var/run/sshd \
|
||||
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
||||
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||
|
||||
ARG mscpdir="/mscp"
|
||||
|
||||
COPY . ${mscpdir}
|
||||
|
||||
# install build dependency
|
||||
RUN ${mscpdir}/scripts/install-build-deps.sh
|
||||
|
||||
|
||||
# build
|
||||
RUN cd ${mscpdir} \
|
||||
&& rm -rf build \
|
||||
&& cmake -B build \
|
||||
&& cd ${mscpdir}/build \
|
||||
&& make -j 2 \
|
||||
&& make install
|
||||
Reference in New Issue
Block a user