Skip to content

Commit d8e660e

Browse files
committed
Add v2.4.1
1 parent 82db7ba commit d8e660e

18 files changed

+1417
-0
lines changed

versions/v2.4.1/Dockerfile

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
ARG ARCH=
2+
FROM ${ARCH}debian:bullseye AS toolchain
3+
4+
RUN echo deb http://deb.debian.org/debian bullseye-backports main >> /etc/apt/sources.list.d/backports.list && \
5+
apt-get -y update && \
6+
apt-get -y install \
7+
build-essential git-core \
8+
lintian pkg-config quilt patch cargo \
9+
node-colors node-commander \
10+
libudev-dev libapt-pkg-dev \
11+
libacl1-dev libpam0g-dev libfuse3-dev \
12+
libsystemd-dev uuid-dev libssl-dev \
13+
libclang-dev libjson-perl libcurl4-openssl-dev \
14+
dh-exec wget \
15+
# workaround security repo woes with dh-nodejs
16+
dh-nodejs/bullseye-backports pkg-js-tools/bullseye-backports \
17+
nodejs=12.22.5~dfsg-2~11u1 libnode72=12.22.5~dfsg-2~11u1
18+
19+
RUN wget https://static.rust-lang.org/rustup/rustup-init.sh && \
20+
chmod +x rustup-init.sh && \
21+
./rustup-init.sh -y --default-toolchain nightly
22+
23+
WORKDIR /src
24+
25+
RUN for tool in /root/.cargo/bin/*; do ln -vsf $tool /usr/bin/; done
26+
RUN /usr/bin/rustc --version
27+
RUN git config --global user.email "[email protected]" && \
28+
git config --global user.name "Docker Compile"
29+
30+
FROM toolchain as builder
31+
32+
# Clone all sources
33+
ARG VERSION=master
34+
ADD /versions/${VERSION}/ /patches/
35+
RUN /patches/clone.bash
36+
37+
# Apply all patches
38+
ADD /scripts/ /scripts/
39+
RUN /scripts/apply-patches.bash /patches/server/*.patch
40+
RUN /scripts/strip-cargo.bash
41+
RUN /scripts/resolve-dependencies.bash
42+
43+
# A first required dep
44+
RUN apt-get -y build-dep $PWD/pve-eslint
45+
RUN cd pve-eslint/ && make dinstall
46+
47+
# A pve-common required deps
48+
RUN apt-get -y build-dep $PWD/proxmox-perl-rs/pve-rs
49+
RUN cd proxmox-perl-rs/ && make pve-rs pve-deb common-deb && dpkg -i build/*.deb
50+
RUN apt-get -y build-dep $PWD/pve-common
51+
RUN cd pve-common/ && ( make dinstall || apt-get -f -y install && make dinstall )
52+
53+
# Install dev dependencies of widget toolkit
54+
RUN apt-get -y build-dep $PWD/proxmox-widget-toolkit
55+
RUN cd proxmox-widget-toolkit/ && make deb && dpkg -i proxmox-widget-toolkit-dev*.deb
56+
57+
# Deps for all rest
58+
RUN apt-get -y build-dep $PWD/proxmox-acme
59+
RUN apt-get -y build-dep $PWD/proxmox-backup
60+
RUN apt-get -y build-dep $PWD/proxmox-mini-journalreader
61+
RUN apt-get -y build-dep $PWD/extjs
62+
RUN apt-get -y build-dep $PWD/proxmox-i18n
63+
RUN apt-get -y build-dep $PWD/pve-xtermjs
64+
RUN apt-get -y build-dep $PWD/libjs-qrcodejs
65+
66+
# Compile ALL
67+
RUN . /root/.cargo/env && cd proxmox-backup/ && DEB_VERSION_UPSTREAM=${VERSION} dpkg-buildpackage -us -uc -b
68+
RUN cd extjs/ && make deb
69+
RUN cd proxmox-i18n/ && make deb
70+
RUN ln -sf /bin/true /usr/share/cargo/bin/dh-cargo-built-using # license is fine (but due to how we compile it, help dpkg for xtermjs)
71+
RUN cd pve-xtermjs/ && dpkg-buildpackage -us -uc -b
72+
RUN cd proxmox-mini-journalreader/ && make deb
73+
RUN cd libjs-qrcodejs/ && make deb
74+
RUN cd proxmox-acme/ && make deb
75+
76+
# Copy all debian packages
77+
RUN mkdir -p /deb && \
78+
find /src/ -name '*.deb' -exec cp -av {} /deb/ \;
79+
80+
#=================================
81+
82+
FROM ${ARCH}debian:bullseye
83+
COPY --from=builder /deb/ /deb/
84+
85+
# Install all packages
86+
RUN export DEBIAN_FRONTEND=noninteractive && \
87+
echo deb http://deb.debian.org/debian bullseye-backports main >> /etc/apt/sources.list.d/backports.list && \
88+
apt-get -y update && \
89+
apt install -y runit ssmtp /deb/*.deb
90+
91+
# Add default configs
92+
ADD /pbs/ /etc/proxmox-backup-default/
93+
94+
VOLUME /etc/proxmox-backup
95+
VOLUME /var/log/proxmox-backup
96+
VOLUME /var/lib/proxmox-backup
97+
98+
ADD runit/ /runit/
99+
CMD ["runsvdir", "/runit"]

versions/v2.4.1/Dockerfile.client

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
ARG DOCKER_ARCH
2+
FROM ${DOCKER_ARCH}/debian:bookworm AS builder
3+
4+
RUN apt-get -y update && \
5+
apt-get -y install \
6+
build-essential git-core \
7+
lintian pkg-config quilt patch cargo \
8+
nodejs node-colors node-commander \
9+
libudev-dev libapt-pkg-dev \
10+
libacl1-dev libpam0g-dev libfuse3-dev \
11+
libsystemd-dev uuid-dev libssl-dev \
12+
libclang-dev libjson-perl libcurl4-openssl-dev \
13+
dh-exec wget
14+
15+
WORKDIR /src
16+
17+
RUN /usr/bin/rustc --version
18+
RUN git config --global user.email "[email protected]" && \
19+
git config --global user.name "Docker Compile"
20+
21+
# Clone all sources
22+
ARG VERSION=master
23+
ADD /versions/${VERSION}/ /patches/
24+
RUN /patches/clone.bash
25+
26+
# Apply all patches
27+
ADD /scripts/ /scripts/
28+
ARG DOCKER_ARCH
29+
RUN /scripts/apply-patches.bash /patches/server/*.patch /patches/client/*.patch /patches/client-${DOCKER_ARCH}/*.patch
30+
RUN /scripts/strip-cargo.bash
31+
RUN /scripts/experimental-cargo.bash
32+
33+
# Build
34+
RUN \
35+
cargo build --manifest-path proxmox-backup/proxmox-backup-client/Cargo.toml --release && \
36+
cargo build --manifest-path proxmox-backup/pxar-bin/Cargo.toml --release
37+
38+
# Bundle client
39+
RUN /scripts/bundle-client.bash

0 commit comments

Comments
 (0)