Fixing POdman builds (#588)

* Update Dockerfile

* Update Dockerfile
This commit is contained in:
John Dorman 2024-01-11 10:38:09 -08:00 committed by GitHub
parent 4a51ef4914
commit 174b8933b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
FROM rust as rust FROM rust as rust
RUN mkdir -p /tmp/work RUN mkdir -p /tmp/work
WORKDIR /tmp/work WORKDIR /tmp/work
ARG NETAVARK_VERSION=v1.6.0 ARG NETAVARK_VERSION=v1.9.0
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
bc \ bc \
binutils-aarch64-linux-gnu \ binutils-aarch64-linux-gnu \
@ -19,10 +19,9 @@ RUN git clone https://github.com/containers/netavark/ && mkdir -p /tmp/work/net
WORKDIR /tmp/work/netavark WORKDIR /tmp/work/netavark
COPY config.toml ./.cargo/config.toml COPY config.toml ./.cargo/config.toml
COPY ./net.Makefile.patch /tmp COPY ./net.Makefile.patch /tmp
RUN git checkout ${NETAVARK_VERSION} && rustup target add aarch64-unknown-linux-gnu && patch Makefile /tmp/net.Makefile.patch RUN git checkout ${NETAVARK_VERSION} && rustup target add aarch64-unknown-linux-gnu && patch Makefile /tmp/net.Makefile.patch && make build
RUN make build
FROM golang:1.18.3-stretch FROM golang:1.21.6-bookworm
# Currenrtly supported versions: UDM-Base UDM-Pro-SE # Currenrtly supported versions: UDM-Base UDM-Pro-SE
ARG UDM_PLATFORM=UDM-Base ARG UDM_PLATFORM=UDM-Base
@ -41,7 +40,11 @@ RUN mkdir -p /tmp/install/podman-${PODMAN_VERSION}-${UDM_PLATFORM}/usr/bin \
COPY --from=rust /tmp/work/netavark/bin/* /tmp/install/podman-${PODMAN_VERSION}-${UDM_PLATFORM}/usr/libexec/podman COPY --from=rust /tmp/work/netavark/bin/* /tmp/install/podman-${PODMAN_VERSION}-${UDM_PLATFORM}/usr/libexec/podman
# Install dependencies # Install dependencies
RUN apt-get update && apt-get install -y \ RUN dpkg --add-architecture arm64 && apt-get update && apt-get install -y \
gperf:arm64 \
libglib2.0-dev:arm64 \
libseccomp-dev:arm64 \
libsystemd-dev:arm64 \
bc \ bc \
binutils-aarch64-linux-gnu \ binutils-aarch64-linux-gnu \
bison \ bison \
@ -57,13 +60,7 @@ RUN apt-get update && apt-get install -y \
systemd \ systemd \
zip \ zip \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN dpkg --add-architecture arm64
RUN apt-get update && apt-get install -y \
gperf:arm64 \
libglib2.0-dev:arm64 \
libseccomp-dev:arm64 \
libsystemd-dev:arm64 \
&& rm -rf /var/lib/apt/lists/*
ENV GOOS=linux ENV GOOS=linux