Skip to content

Commit

Permalink
Update to podman 5, including netavark and pasta
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcen committed Apr 8, 2024
1 parent cdb3947 commit 1ec9a5b
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions 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 @@ -68,29 +68,27 @@ RUN set -ex; \
! ldd $PLUGINBIN; \
done

# netavark

# slirp4netns
FROM podmanbuildbase AS slirp4netns
FROM podmanbuildbase AS netavark
WORKDIR /
RUN apk add --update --no-cache autoconf automake meson ninja linux-headers libcap-static libcap-dev clang llvm
# Build libslirp
ARG LIBSLIRP_VERSION=v4.7.0
RUN git clone -c 'advice.detachedHead=false' --depth=1 --branch=${LIBSLIRP_VERSION} https://gitlab.freedesktop.org/slirp/libslirp.git
WORKDIR /libslirp
RUN set -ex; \
rm -rf /usr/lib/libglib-2.0.so /usr/lib/libintl.so; \
ln -s /usr/bin/clang /go/bin/clang; \
LDFLAGS="-s -w -static" meson --prefix /usr -D default_library=static build; \
ninja -C build install
# Build slirp4netns
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 /
ARG SLIRP4NETNS_VERSION=v1.2.3
RUN git clone -c 'advice.detachedHead=false' --depth=1 --branch $SLIRP4NETNS_VERSION https://github.com/rootless-containers/slirp4netns.git
WORKDIR /slirp4netns
RUN set -ex; \
./autogen.sh; \
LDFLAGS=-static ./configure --prefix=/usr; \
make
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)
Expand Down Expand Up @@ -184,7 +182,8 @@ COPY conf/crun-containers.conf /etc/containers/containers.conf
# Build podman image with rootless binaries and CNI plugins
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

0 comments on commit 1ec9a5b

Please sign in to comment.