mirror of
https://gitlab.com/alliedmaldives/ops/podmanbuilder.git
synced 2025-02-23 07:32:07 +00:00
CNI plugins and some comments
This commit is contained in:
parent
ae7c6bea88
commit
3133f1718b
@ -26,10 +26,9 @@ apt-get install --no-install-recommends -y \
|
|||||||
pkg-config \
|
pkg-config \
|
||||||
uidmap
|
uidmap
|
||||||
|
|
||||||
go get golang.org/dl/go1.17.6
|
apt install --no-install-recommends -y jq wget curl make ca-certificates
|
||||||
go1.17.6 download
|
|
||||||
|
|
||||||
apt install --no-install-recommends -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
|
||||||
@ -40,29 +39,18 @@ git checkout tags/$VERSION
|
|||||||
|
|
||||||
make ENABLE_BUILDTAGS="systemd" binaries
|
make ENABLE_BUILDTAGS="systemd" binaries
|
||||||
|
|
||||||
|
# copy the binaries to mounted build folder and go back to root home
|
||||||
cp -vr bin/ ../build
|
cp -vr bin/ ../build
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cd /root/
|
cd /root/
|
||||||
|
|
||||||
apt update
|
# remove v in version name
|
||||||
apt upgrade -y
|
NVERSION=$(echo $VERSION | sed s/v//)
|
||||||
apt install -y jq wget curl make
|
|
||||||
|
|
||||||
VERSION=$(curl -s https://api.github.com/repos/containers/podman/releases/latest | jq '.name' -r)
|
|
||||||
export VERSION
|
|
||||||
|
|
||||||
cp -vr build/ bin/
|
|
||||||
|
|
||||||
VERSION=$(echo $VERSION | sed s/v//)
|
|
||||||
## PREPARE to package into .deb
|
## PREPARE to package into .deb
|
||||||
mkdir -p podman-deb/DEBIAN
|
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
|
cat <<EOF > podman-deb/DEBIAN/control
|
||||||
Package: podman
|
Package: podman
|
||||||
Version: $VERSION
|
Version: $NVERSION
|
||||||
Depends: libgpgme11
|
Depends: libgpgme11
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
@ -73,6 +61,15 @@ Description: Podman container engine
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# CNI plugins
|
||||||
|
mkdir -p podman-deb/etc/containers/
|
||||||
|
curl -L -o podman-deb/etc/containers/registries.conf https://src.fedoraproject.org/rpms/containers-common/raw/main/f/registries.conf
|
||||||
|
curl -L -o podman-deb/etc/containers/policy.json https://src.fedoraproject.org/rpms/containers-common/raw/main/f/default-policy.json
|
||||||
|
|
||||||
|
|
||||||
|
# Systemd service and socket files
|
||||||
|
mkdir -p podman-deb/usr/lib/systemd/system/
|
||||||
|
|
||||||
cat <<EOF > podman-deb/usr/lib/systemd/system/podman.service
|
cat <<EOF > podman-deb/usr/lib/systemd/system/podman.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Podman API Service
|
Description=Podman API Service
|
||||||
@ -107,11 +104,14 @@ WantedBy=sockets.target
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# Copy the binaries
|
||||||
|
mkdir -p podman-deb/usr/local/bin
|
||||||
cp -v build/bin/podman podman-deb/usr/local/bin/
|
cp -v build/bin/podman podman-deb/usr/local/bin/
|
||||||
cp -v build/bin/podman-remote podman-deb/usr/local/bin/
|
cp -v build/bin/podman-remote podman-deb/usr/local/bin/
|
||||||
cp -v build/bin/quadlet podman-deb/usr/local/bin/
|
cp -v build/bin/quadlet podman-deb/usr/local/bin/
|
||||||
cp -v build/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/*
|
||||||
|
|
||||||
|
# Finally build the .deb
|
||||||
dpkg-deb --build podman-deb build
|
dpkg-deb --build podman-deb build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user