fuse-overlayfs/Containerfile.cross
Akihiro Suda c2751bd5ff
Containerfile.cross: refactor + support riscv64
- Switch away from tonistiigi/binfmt/cross.sh to tonistiigi/xx .
  cross.sh was removed in tonistiigi/binfmt@99c76af6 .

- Remove dependency on QEMU user mode emulation

- Switch away from debian:10 to ubuntu:22.04, for supporting riscv64

- Clean up unneeded deps

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-05-01 02:20:52 +09:00

19 lines
677 B
Plaintext

FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.1.0 AS xx
FROM --platform=$BUILDPLATFORM ubuntu:22.04 AS fuse-overlayfs
RUN apt-get update && \
apt-get install --no-install-recommends -y \
git make automake autoconf pkgconf file go-md2man
COPY . /fuse-overlayfs
WORKDIR /fuse-overlayfs
COPY --from=xx / /
ARG TARGETPLATFORM
ENV DEBIAN_FRONTEND=noninteractive
RUN xx-apt-get install -y gcc libfuse3-dev
RUN ./autogen.sh && \
LIBS="-ldl" LDFLAGS="-static" ./configure --host=$(xx-info) && \
make && mkdir /out && cp fuse-overlayfs /out && \
file /out/fuse-overlayfs | grep "statically linked"
FROM scratch
COPY --from=fuse-overlayfs /out/fuse-overlayfs /fuse-overlayfs