Skip to content

Commit

Permalink
add containers/podman-ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
petrnovota committed Jun 25, 2024
1 parent 66d4656 commit d8f9c6b
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 0 deletions.
24 changes: 24 additions & 0 deletions containers/podman-ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM docker.io/debian:bullseye-slim

ARG GO_LANG_VERSION

RUN apt update
RUN apt-get install -y wget gcc git make gettext-base runc libsystemd-dev libseccomp-dev libc6-dev \
libglib2.0-dev btrfs-progs iptables libassuan-dev libbtrfs-dev libdevmapper-dev libgpgme-dev \
libgpg-error-dev libprotobuf-dev libprotobuf-c-dev libselinux1-dev uidmap libapparmor-dev

RUN wget "https://go.dev/dl/go${GO_LANG_VERSION}.linux-$(dpkg --print-architecture).tar.gz"
RUN rm -rf /usr/local/go && tar -C /usr/local -xzf "go${GO_LANG_VERSION}.linux-$(dpkg --print-architecture).tar.gz"
ENV PATH="${PATH}:/usr/local/go/bin"
RUN go version

RUN apt-get install -y curl
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="${PATH}:/root/.cargo/bin"
RUN echo $PATH
RUN cargo --version

VOLUME /app
WORKDIR /app

CMD ["sh", "./build.sh"]
17 changes: 17 additions & 0 deletions containers/podman-ubuntu/build-conmon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

set -eux

ARCH="$(uname -m)"
export PACKAGE_ARCH="$(dpkg --print-architecture)"
PKG_ROOT="$(pwd)/conmon_${CONMON_VERSION}"

mkdir -p $PKG_ROOT/usr/local/libexec/podman

git clone --depth 1 --branch "v${CONMON_VERSION}" https://github.com/containers/conmon.git
cd conmon
export GOCACHE="$(mktemp -d)"
make DESTDIR=$PKG_ROOT podman

cd ..
tar -zcvf ./packages/conmon_${CONMON_VERSION}_${ARCH}.tar.gz -C "${PKG_ROOT}" usr
22 changes: 22 additions & 0 deletions containers/podman-ubuntu/build-netavark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

set -eux

ARCH="$(uname -m)"
PKG_ROOT="$(pwd)/netavark_${NETAVARK_VERSION}"

mkdir -p "${PKG_ROOT}/usr/local/libexec/podman"

git clone --depth 1 --branch "v${NETAVARK_VERSION}" https://github.com/containers/netavark/
cd netavark
make
cp ./bin/netavark "${PKG_ROOT}/usr/local/libexec/podman/"
cd ..

git clone --depth 1 --branch "v${AARDVARK_DNS_VERSION}" https://github.com/containers/aardvark-dns/
cd aardvark-dns
make
cp ./bin/aardvark-dns "${PKG_ROOT}/usr/local/libexec/podman/"
cd ..

tar -zcvf ./packages/aardvark_dns_${AARDVARK_DNS_VERSION}_${ARCH}.tar.gz -C "${PKG_ROOT}" usr
17 changes: 17 additions & 0 deletions containers/podman-ubuntu/build-podman.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

set -eux

ARCH="$(uname -m)"
export PACKAGE_ARCH="$(dpkg --print-architecture)"

PKG_ROOT="$(pwd)/podman_${PODMAN_VERSION}"

mkdir -p "${PKG_ROOT}/usr/local/bin"

git clone --depth 1 --branch "v${PODMAN_VERSION}" https://github.com/containers/podman/
cd podman
make BUILDTAGS="seccomp apparmor systemd"
make DESTDIR=$PKG_ROOT install
cd ..
tar -zcvf ./packages/podman_${PODMAN_VERSION}_${ARCH}.tar.gz -C "${PKG_ROOT}" usr
5 changes: 5 additions & 0 deletions containers/podman-ubuntu/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

sh ./build-conmon.sh
sh ./build-netavark.sh
sh ./build-podman.sh

0 comments on commit d8f9c6b

Please sign in to comment.