mirror of
https://github.com/upa/mscp.git
synced 2026-02-04 03:24:58 +08:00
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
36 lines
889 B
Docker
36 lines
889 B
Docker
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
|
|
|