Skip to content

Commit ee8a6ab

Browse files
committed
add ReadMe and dockerfile
1 parent b83f897 commit ee8a6ab

3 files changed

Lines changed: 106 additions & 41 deletions

File tree

‎README.md‎

100644100755
Lines changed: 19 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,29 @@
1-
# Proxmox-Port
1+
# Proxmox VE Port package source
22

3-
Arm64/Riscv64/Loongarch64 are ok.
3+
## How to Build
44

5-
There is a detailed introduction in the wiki.
5+
### Initializing the build host
6+
We need Debian 12 for this code
67

7-
## 1. Tested platform:
8-
- Rockpi (arm64)
9-
- Raspberry Pi (arm64)
10-
- Amlogic TV box (arm64)
11-
- Kunpeng (arm64)
12-
- FT (arm64)
13-
- Ampere (arm64)
14-
- Apple (arm64,vm only,no kvm support)
15-
- 3A5000/3A6000/3C5000 (loongarch64)
16-
- VisionFive2 (riscv64)
17-
18-
Detailed: https://github.com/jiangcuo/Proxmox-Port/wiki/Support-List
8+
```bash
9+
apt update
10+
apt install quilt docker.io -y
11+
cd docker
12+
docker build -t pvebuilder -f dockerfile.arm64 .
13+
```
1914

15+
### Build via Docker
2016

21-
## 2. screen shot
22-
arm64
17+
```bash
18+
bash build.sh pve-common
19+
```
2320

24-
<img width="800" alt="image" src="https://github.com/jiangcuo/Proxmox-Port/assets/49061187/0628e750-e0ff-4b74-a90e-865aac4df8fa">
21+
The built package will be under /tmp/pve-common
2522

26-
riscv64
2723

28-
<img width="800" alt="image" src="https://github.com/jiangcuo/Proxmox-Port/assets/49061187/841799fc-85c0-4227-ab12-e999ee66ffd3">
24+
### Custom Docker Image
2925

26+
```bash
27+
BUILDERNAME=dockerpull.com/pvebuilder:20241101 bash build.sh pve-common
28+
```
3029

31-
loongarch64
32-
33-
<img width="800" alt="image" src="https://github.com/jiangcuo/Proxmox-Port/assets/49061187/1d01de5a-455c-46d4-9ff1-12ba199a5e66">
34-
35-
36-
## 3. Installation
37-
38-
If you are using server that supports EFI,you can install proxmox-ve with iso.
39-
40-
https://mirrors.apqa.cn/proxmox/isos/
41-
42-
If you are using u-boot device or failed with iso, you can install proxmox-ve from repo.
43-
44-
Head to the wiki page to learn more.
45-
46-
47-
## Star History
48-
49-
50-
51-
[![Star History Chart](https://api.star-history.com/svg?repos=jiangcuo/Proxmox-Arm64,jiangcuo/Proxmox-Port&type=Date)](https://star-history.com/#jiangcuo/Proxmox-Arm64&jiangcuo/Proxmox-Port&Date)

‎docker/dockerfile.arm64‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
FROM debian:12
2+
ARG DEBIAN_APT=http://mirrors.ustc.edu.cn
3+
ARG PVE_APT=https://mirrors.lierfang.com
4+
ARG ARCH=
5+
6+
7+
8+
9+
RUN rm /etc/apt/sources.list.d/* \
10+
&& echo "deb $DEBIAN_APT/debian bookworm main contrib non-free non-free-firmware" >/etc/apt/sources.list \
11+
&& echo "deb $DEBIAN_APT/debian bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list \
12+
&& echo "deb $DEBIAN_APT/debian bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list \
13+
&& echo "deb $DEBIAN_APT/debian-security bookworm-security main contrib non-free non-free-firmware " >> /etc/apt/sources.list
14+
15+
16+
RUN apt update && apt install -y wget nano curl gnupg ca-certificates apt-utils
17+
18+
19+
20+
RUN ARCH=$(dpkg --print-architecture) \
21+
&& if [ "$ARCH" = "amd64" ]; then \
22+
echo "deb $PVE_APT/proxmox/debian/pve bookworm pve-no-subscription" >> /etc/apt/sources.list; \
23+
echo "deb $PVE_APT/proxmox/debian/devel bookworm main" >> /etc/apt/sources.list; \
24+
curl -l -o /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg $PVE_APT/proxmox/debian/proxmox-release-bookworm.gpg; \
25+
else \
26+
echo "deb $PVE_APT/proxmox/debian/pve bookworm port" >> /etc/apt/sources.list; \
27+
echo "deb $PVE_APT/proxmox/debian/devel bookworm port" >> /etc/apt/sources.list; \
28+
curl -l -o /etc/apt/trusted.gpg.d/pveport.gpg $PVE_APT/proxmox/debian/pveport.gpg; \
29+
fi
30+
31+
RUN apt update && apt -y install build-* devscripts cargo dh-cargo devscripts rsync debcargo pkg-config debhelper git bison dwarves flex meson equivs
32+
33+
RUN apt update \
34+
&& DEBIAN_FRONTEND=noninteractiv apt-get -y --no-install-recommends install proxmox-ve || echo ok
35+
36+
RUN rm /var/lib/dpkg/info/pve-manager.postinst \
37+
&& rm /var/lib/dpkg/info/proxmox-ve.postinst \
38+
&& dpkg --configure -a
39+
40+
41+
ADD ./start.sh /
42+
43+
CMD ["bash","/start.sh"]

‎docker/start.sh‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
errlog(){
3+
echo $1
4+
exit 1
5+
6+
}
7+
8+
exec_build(){
9+
echo "install depends"
10+
apt update
11+
yes |mk-build-deps --install --remove
12+
if [ -f "Makefile" ];then
13+
echo "clean "
14+
make clean || echo ok
15+
echo "build deb in `pwd` "
16+
make deb
17+
else
18+
dpkg-buildpackage -b -us -uc ||errlog "build error"
19+
cp ../*.deb ../*.buildinfo ../*.changes $PKGDIR
20+
fi
21+
}
22+
23+
if [ ! -d "$PKGDIR" ];then
24+
errlog "$PKGDIR dir is not existd,Exitting !"
25+
fi
26+
27+
28+
if [ -f "$PKGDIR/../autobuild.sh" ];then
29+
cd $PKGDIR/../
30+
bash autobuild.sh
31+
else
32+
# Rust not need copy
33+
if [ ! -f "Cargo.toml" ];then
34+
cd $PKGDIR
35+
exec_build
36+
else
37+
mkdir /build/
38+
rsync -ra $PKGDIR /build
39+
cd /build/data
40+
exec_build
41+
fi
42+
43+
44+
fi

0 commit comments

Comments
 (0)