diff options
Diffstat (limited to 'docker')
-rw-r--r-- | docker/.gitignore | 3 | ||||
-rw-r--r-- | docker/README.md | 37 | ||||
-rw-r--r-- | docker/almalinux-8.8.Dockerfile | 34 | ||||
-rw-r--r-- | docker/alpine-3.17.Dockerfile | 37 | ||||
-rw-r--r-- | docker/build-deb.Dockerfile | 20 | ||||
-rw-r--r-- | docker/build-srpm.Dockerfile | 22 | ||||
-rw-r--r-- | docker/build-srpm.Dockerfile.in | 22 | ||||
-rw-r--r-- | docker/rocky-8.8.Dockerfile | 31 | ||||
-rw-r--r-- | docker/ubuntu-20.04.Dockerfile | 36 | ||||
-rw-r--r-- | docker/ubuntu-22.04.Dockerfile | 35 |
10 files changed, 0 insertions, 277 deletions
diff --git a/docker/.gitignore b/docker/.gitignore deleted file mode 100644 index f7083c9..0000000 --- a/docker/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ - -# generated by cmake -rpmbuild.Dockerfile diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index 8e3dbe9..0000000 --- a/docker/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -Build docker containers. - -```console -cd .. - -docker build -t mscp-ubuntu:20.04 -f docker/ubuntu-20.04.Dockerfile . - -docker build -t mscp-ubuntu:22.04 -f docker/ubuntu-22.04.Dockerfile . - -docker build -t mscp-rocky:8.8 -f docker/rocky-8.Dockerfile . -``` - -Test `mscp` in the containers. - -```console -docker run --init --rm mscp-ubuntu:20.04 /mscp/scripts/test-in-container.sh - -docker run --init --rm mscp-ubuntu:22.04 /mscp/scripts/test-in-container.sh - -docker run --init --rm mscp-rocky:8.9 /mscp/scripts/test-in-container.sh -``` - -Retrieve deb/rpm packages. - -```console -docker run --rm -v (pwd):/out mscp-ubuntu:20.04 \ - cp /mscp/build/mscp_ubuntu-20.04-x86_64.deb /out/ - -docker run --rm -v (pwd):/out mscp-ubuntu:22.04 \ - cp /mscp/build/mscp_ubuntu-22.04-x86_64.deb /out/ - -docker run --rm -v (pwd):/out mscp-rocky:8.8 \ - cp /mscp/build/mscp_rocky-8.8-x86_64.rpm /out/ -``` - -I don't know whether these are good way.
\ No newline at end of file diff --git a/docker/almalinux-8.8.Dockerfile b/docker/almalinux-8.8.Dockerfile deleted file mode 100644 index 5ff41ed..0000000 --- a/docker/almalinux-8.8.Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -FROM almalinux:8.8 - -# install pytest, sshd for test, and rpm-build -RUN set -ex && \ - rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux && \ - 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 \ - && cpack -G RPM CPackConfig.cmake \ - && rpm -iv *.rpm - diff --git a/docker/alpine-3.17.Dockerfile b/docker/alpine-3.17.Dockerfile deleted file mode 100644 index b79510f..0000000 --- a/docker/alpine-3.17.Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM alpine:3.17 - -# 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 g++ - -RUN pip3 install conan pytest - -# 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 \ - && cp mscp /usr/bin/ \ - && cp mscp /mscp/build/mscp_alpine-3.17-x86_64.static -# copy mscp to PKG FILE NAME because this build doesn't use CPACK - diff --git a/docker/build-deb.Dockerfile b/docker/build-deb.Dockerfile deleted file mode 100644 index e3e6381..0000000 --- a/docker/build-deb.Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -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 - diff --git a/docker/build-srpm.Dockerfile b/docker/build-srpm.Dockerfile deleted file mode 100644 index b614fc1..0000000 --- a/docker/build-srpm.Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -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 diff --git a/docker/build-srpm.Dockerfile.in b/docker/build-srpm.Dockerfile.in deleted file mode 100644 index f7a8cf0..0000000 --- a/docker/build-srpm.Dockerfile.in +++ /dev/null @@ -1,22 +0,0 @@ -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 diff --git a/docker/rocky-8.8.Dockerfile b/docker/rocky-8.8.Dockerfile deleted file mode 100644 index 6140905..0000000 --- a/docker/rocky-8.8.Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM rockylinux:8.8 - -# 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 \ - && cpack -G RPM CPackConfig.cmake \ - && rpm -iv *.rpm - diff --git a/docker/ubuntu-20.04.Dockerfile b/docker/ubuntu-20.04.Dockerfile deleted file mode 100644 index c1da765..0000000 --- a/docker/ubuntu-20.04.Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -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 \ - && cpack -G DEB CPackConfig.cmake \ - && dpkg -i *.deb - diff --git a/docker/ubuntu-22.04.Dockerfile b/docker/ubuntu-22.04.Dockerfile deleted file mode 100644 index 377cfff..0000000 --- a/docker/ubuntu-22.04.Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -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 \ - && cpack -G DEB CPackConfig.cmake \ - && dpkg -i *.deb - |