Skip to content

Commit

Permalink
feat: upgrade to podman 5.0.0 (#87)
Browse files Browse the repository at this point in the history
* Upgrade to podman 5
* Include netavark and pasta binaries (new podman network stack and CNI replacement)
* Makefile: Don't access image dir directly for copy out
  • Loading branch information
mattcen authored and mgoltzsche committed May 19, 2024
1 parent cdb3947 commit b59b3c5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
25 changes: 24 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN apk add --update --no-cache git make gcc pkgconf musl-dev \
# podman (without systemd support)
FROM podmanbuildbase AS podman
RUN apk add --update --no-cache tzdata curl
ARG PODMAN_VERSION=v4.9.4
ARG PODMAN_VERSION=v5.0.0
ARG PODMAN_BUILDTAGS='seccomp selinux apparmor exclude_graphdriver_devicemapper containers_image_openpgp'
ARG PODMAN_CGO=1
RUN git clone -c 'advice.detachedHead=false' --depth=1 --branch ${PODMAN_VERSION} https://github.com/containers/podman src/github.com/containers/podman
Expand Down Expand Up @@ -92,6 +92,27 @@ RUN set -ex; \
LDFLAGS=-static ./configure --prefix=/usr; \
make

# netavark
FROM podmanbuildbase AS netavark
WORKDIR /
RUN apk add --update --no-cache cargo
# Build passt
ARG NETAVARK_VERSION=v1.10.3
RUN git clone -c 'advice.detachedHead=false' --depth=1 --branch=${NETAVARK_VERSION} https://github.com/containers/netavark
WORKDIR /netavark
RUN LDFLAGS=-static make


# passt
FROM podmanbuildbase AS passt
WORKDIR /
RUN apk add --update --no-cache autoconf automake meson ninja linux-headers libcap-static libcap-dev clang llvm coreutils
# Build passt
ARG PASST_VERSION=2024_04_05.954589b
RUN git clone -c 'advice.detachedHead=false' --depth=1 --branch=${PASST_VERSION} git://passt.top/passt
WORKDIR /passt
RUN make static


# fuse-overlayfs (derived from https://github.com/containers/fuse-overlayfs/blob/master/Dockerfile.static)
FROM podmanbuildbase AS fuse-overlayfs
Expand Down Expand Up @@ -185,6 +206,8 @@ COPY conf/crun-containers.conf /etc/containers/containers.conf
FROM rootlesspodmanrunc AS podmanall
RUN apk add --no-cache iptables ip6tables
COPY --from=slirp4netns /slirp4netns/slirp4netns /usr/local/bin/slirp4netns
COPY --from=passt /passt/pasta /usr/local/bin/pasta
COPY --from=netavark /netavark/bin/netavark /usr/local/lib/podman/netavark
COPY --from=cniplugins /usr/local/lib/cni /usr/local/lib/cni
COPY --from=catatonit /catatonit/catatonit /usr/local/lib/podman/catatonit
COPY conf/cni /etc/cni
2 changes: 1 addition & 1 deletion Dockerfile-remote
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apk add --update --no-cache git make gcc pkgconf musl-dev \
# podman remote
FROM podmanbuildbase AS podman-remote
RUN apk add --update --no-cache curl
ARG PODMAN_VERSION=v4.9.4
ARG PODMAN_VERSION=v5.0.0
RUN git clone -c advice.detachedHead=false --depth=1 --branch=${PODMAN_VERSION} https://github.com/containers/podman src/github.com/containers/podman
WORKDIR $GOPATH/src/github.com/containers/podman
RUN set -eux; \
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ tar: .podman-from-container
cp -r conf/containers $(ASSET_DIR)/etc/containers
cp -r conf/cni $(ASSET_DIR)/etc/cni
cp README.md $(ASSET_DIR)/
cp -r $(IMAGE_ROOTFS)/usr/local/lib $(ASSET_DIR)/usr/local/lib
cp -r $(IMAGE_ROOTFS)/usr/local/bin $(ASSET_DIR)/usr/local/bin
$(DOCKER) run --rm $(PODMAN_IMAGE) tar c /usr/local/{bin,lib} | tar -xC $(ASSET_DIR)

signed-tar: tar .gpg
@echo Running gpg signing container with GPG_SIGN_KEY and GPG_SIGN_KEY_PASSPHRASE
Expand Down

0 comments on commit b59b3c5

Please sign in to comment.