mirror of
https://gitlab.com/alliedmaldives/ops/podmanbuilder.git
synced 2025-02-22 17:22:22 +00:00
IT BUILDS IN DEBIAN NOW
This commit is contained in:
parent
6def0c9e04
commit
b914e17b7b
@ -6,7 +6,7 @@
|
|||||||
```bash
|
```bash
|
||||||
git clone git@gitlab.com:alliedmaldives/ops/podmanbuilder.git
|
git clone git@gitlab.com:alliedmaldives/ops/podmanbuilder.git
|
||||||
cd podmanbuilder
|
cd podmanbuilder
|
||||||
docker compose run --rm podman-builder /bin/bash -c 'bash /root/buildscript.sh'
|
./build.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
- you should have the .deb file in a folder called 'build'
|
- you should have the .deb file in a folder called 'build'
|
||||||
|
10
build.sh
Executable file
10
build.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
docker compose -f ubuntu-docker-compose.yml\
|
||||||
|
run --rm podman-builder \
|
||||||
|
/bin/bash -c 'bash /root/pomanbin-build.sh'
|
||||||
|
|
||||||
|
docker compose -f debian-docker-compose.yml\
|
||||||
|
run --rm podman-builder \
|
||||||
|
/bin/bash -c 'bash /root/podmandeb-build.sh'
|
11
debian-docker-compose.yml
Normal file
11
debian-docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
version: '3.5'
|
||||||
|
services:
|
||||||
|
#########################
|
||||||
|
podman-builder:
|
||||||
|
hostname: podman-builder
|
||||||
|
image: debian
|
||||||
|
working_dir: /root/
|
||||||
|
volumes:
|
||||||
|
- ./build:/root/build
|
||||||
|
- ./podmandeb-build.sh:/root/podmandeb-build.sh
|
||||||
|
command: bash /root/podmandeb-build.sh
|
@ -4,42 +4,42 @@ cd /root/
|
|||||||
|
|
||||||
apt update
|
apt update
|
||||||
apt upgrade -y
|
apt upgrade -y
|
||||||
apt-get install -y \
|
#apt-get install -y \
|
||||||
btrfs-progs \
|
# btrfs-progs \
|
||||||
crun \
|
# crun \
|
||||||
git \
|
# git \
|
||||||
golang-go \
|
# golang-go \
|
||||||
go-md2man \
|
# go-md2man \
|
||||||
iptables \
|
# iptables \
|
||||||
libassuan-dev \
|
# libassuan-dev \
|
||||||
libbtrfs-dev \
|
# libbtrfs-dev \
|
||||||
libc6-dev \
|
# libc6-dev \
|
||||||
libdevmapper-dev \
|
# libdevmapper-dev \
|
||||||
libglib2.0-dev \
|
# libglib2.0-dev \
|
||||||
libgpgme-dev \
|
# libgpgme-dev \
|
||||||
libgpg-error-dev \
|
# libgpg-error-dev \
|
||||||
libprotobuf-dev \
|
# libprotobuf-dev \
|
||||||
libprotobuf-c-dev \
|
# libprotobuf-c-dev \
|
||||||
libseccomp-dev \
|
# libseccomp-dev \
|
||||||
libselinux1-dev \
|
# libselinux1-dev \
|
||||||
libsystemd-dev \
|
# libsystemd-dev \
|
||||||
pkg-config \
|
# pkg-config \
|
||||||
uidmap
|
# uidmap
|
||||||
|
#
|
||||||
apt install -y jq wget curl make
|
apt install -y jq wget curl make
|
||||||
|
#
|
||||||
VERSION=$(curl -s https://api.github.com/repos/containers/podman/releases/latest | jq '.name' -r)
|
VERSION=$(curl -s https://api.github.com/repos/containers/podman/releases/latest | jq '.name' -r)
|
||||||
export VERSION
|
export VERSION
|
||||||
|
#
|
||||||
git clone https://github.com/containers/podman.git podman-$VERSION
|
#git clone https://github.com/containers/podman.git podman-$VERSION
|
||||||
cd podman-$VERSION
|
#cd podman-$VERSION
|
||||||
git checkout tags/$VERSION
|
#git checkout tags/$VERSION
|
||||||
|
#
|
||||||
make ENABLE_BUILDTAGS="systemd" binaries
|
#make ENABLE_BUILDTAGS="systemd" binaries
|
||||||
|
|
||||||
|
|
||||||
cp -vr bin/ ..
|
cp -vr build/ bin/
|
||||||
cd ..
|
#cd ..
|
||||||
|
|
||||||
VERSION=$(echo $VERSION | sed s/v//)
|
VERSION=$(echo $VERSION | sed s/v//)
|
||||||
## PREPARE to package into .deb
|
## PREPARE to package into .deb
|
||||||
@ -93,12 +93,11 @@ WantedBy=sockets.target
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cp -v bin/podman podman-deb/usr/local/bin/
|
cp -v build/bin/podman podman-deb/usr/local/bin/
|
||||||
cp -v bin/podman-remote podman-deb/usr/local/bin/
|
cp -v build/bin/podman-remote podman-deb/usr/local/bin/
|
||||||
cp -v bin/quadlet podman-deb/usr/local/bin/
|
cp -v build/bin/quadlet podman-deb/usr/local/bin/
|
||||||
cp -v bin/rootlessport podman-deb/usr/local/bin/
|
cp -v build/bin/rootlessport podman-deb/usr/local/bin/
|
||||||
|
|
||||||
# ofc the permission
|
# ofc the permission
|
||||||
chmod 755 podman-deb/usr/local/bin/*
|
chmod 755 podman-deb/usr/local/bin/*
|
||||||
|
|
||||||
dpkg-deb --build podman-deb build
|
dpkg-deb --build podman-deb build
|
105
pomanbin-build.sh
Normal file
105
pomanbin-build.sh
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd /root/
|
||||||
|
|
||||||
|
apt update
|
||||||
|
apt upgrade -y
|
||||||
|
apt-get install -y \
|
||||||
|
btrfs-progs \
|
||||||
|
crun \
|
||||||
|
git \
|
||||||
|
golang-go \
|
||||||
|
go-md2man \
|
||||||
|
iptables \
|
||||||
|
libassuan-dev \
|
||||||
|
libbtrfs-dev \
|
||||||
|
libc6-dev \
|
||||||
|
libdevmapper-dev \
|
||||||
|
libglib2.0-dev \
|
||||||
|
libgpgme-dev \
|
||||||
|
libgpg-error-dev \
|
||||||
|
libprotobuf-dev \
|
||||||
|
libprotobuf-c-dev \
|
||||||
|
libseccomp-dev \
|
||||||
|
libselinux1-dev \
|
||||||
|
libsystemd-dev \
|
||||||
|
pkg-config \
|
||||||
|
uidmap
|
||||||
|
|
||||||
|
apt install -y jq wget curl make
|
||||||
|
|
||||||
|
VERSION=$(curl -s https://api.github.com/repos/containers/podman/releases/latest | jq '.name' -r)
|
||||||
|
export VERSION
|
||||||
|
|
||||||
|
git clone https://github.com/containers/podman.git podman-$VERSION
|
||||||
|
cd podman-$VERSION
|
||||||
|
git checkout tags/$VERSION
|
||||||
|
|
||||||
|
make ENABLE_BUILDTAGS="systemd" binaries
|
||||||
|
|
||||||
|
cp -vr bin/ ../build
|
||||||
|
|
||||||
|
#cp -vr bin/ ..
|
||||||
|
#cd ..
|
||||||
|
#
|
||||||
|
#VERSION=$(echo $VERSION | sed s/v//)
|
||||||
|
### PREPARE to package into .deb
|
||||||
|
#mkdir -p podman-deb/DEBIAN
|
||||||
|
#mkdir -p podman-deb/usr/local/bin
|
||||||
|
#mkdir -p podman-deb/usr/lib/systemd/system/
|
||||||
|
#
|
||||||
|
#cat <<EOF > podman-deb/DEBIAN/control
|
||||||
|
#Package: podman
|
||||||
|
#Version: $VERSION
|
||||||
|
#Section: base
|
||||||
|
#Priority: optional
|
||||||
|
#Architecture: amd64
|
||||||
|
#Maintainer: Shiham Abdul Rahman <shihaam@shihaam.me>
|
||||||
|
#Description: Podman container engine
|
||||||
|
# Podman is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System.
|
||||||
|
#
|
||||||
|
#EOF
|
||||||
|
#
|
||||||
|
#cat <<EOF > podman-deb/usr/lib/systemd/system/podman.service
|
||||||
|
#[Unit]
|
||||||
|
#Description=Podman API Service
|
||||||
|
#Requires=podman.socket
|
||||||
|
#After=podman.socket
|
||||||
|
#Documentation=man:podman-system-service(1)
|
||||||
|
#StartLimitIntervalSec=0
|
||||||
|
#
|
||||||
|
#[Service]
|
||||||
|
#Delegate=true
|
||||||
|
#Type=exec
|
||||||
|
#KillMode=process
|
||||||
|
#Environment=LOGGING="--log-level=info"
|
||||||
|
#ExecStart=/usr/bin/podman $LOGGING system service
|
||||||
|
#
|
||||||
|
#[Install]
|
||||||
|
#WantedBy=default.target
|
||||||
|
#
|
||||||
|
#EOF
|
||||||
|
#
|
||||||
|
#cat <<EOF > podman-deb/usr/lib/systemd/system/podman.socket
|
||||||
|
#[Unit]
|
||||||
|
#Description=Podman API Socket
|
||||||
|
#Documentation=man:podman-system-service(1)
|
||||||
|
#
|
||||||
|
#[Socket]
|
||||||
|
#ListenStream=%t/podman/podman.sock
|
||||||
|
#SocketMode=0660
|
||||||
|
#
|
||||||
|
#[Install]
|
||||||
|
#WantedBy=sockets.target
|
||||||
|
#
|
||||||
|
#EOF
|
||||||
|
#
|
||||||
|
#cp -v bin/podman podman-deb/usr/local/bin/
|
||||||
|
#cp -v bin/podman-remote podman-deb/usr/local/bin/
|
||||||
|
#cp -v bin/quadlet podman-deb/usr/local/bin/
|
||||||
|
#cp -v bin/rootlessport podman-deb/usr/local/bin/
|
||||||
|
#
|
||||||
|
## ofc the permission
|
||||||
|
#chmod 755 podman-deb/usr/local/bin/*
|
||||||
|
#
|
||||||
|
#dpkg-deb --build podman-deb build
|
@ -7,5 +7,5 @@ services:
|
|||||||
working_dir: /root/
|
working_dir: /root/
|
||||||
volumes:
|
volumes:
|
||||||
- ./build:/root/build
|
- ./build:/root/build
|
||||||
- ./buildscript.sh:/root/buildscript.sh
|
- ./pomanbin-build.sh:/root/pomanbin-build.sh
|
||||||
command: bash /root/buildscript.sh
|
command: bash /root/pomanbin-build.sh
|
Loading…
x
Reference in New Issue
Block a user