From 6648d1da1df9a4e4e2945739fc0fd3c7f77643cb Mon Sep 17 00:00:00 2001 From: fx Date: Sat, 14 Oct 2023 22:01:33 +0200 Subject: test this fing shit on pi wohoo --- Dockerfile.build | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'Dockerfile.build') diff --git a/Dockerfile.build b/Dockerfile.build index 3bbaf39..0158b8a 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -1,16 +1,18 @@ +FROM debian:bookworm AS deb_extractor +RUN cd /tmp && \ + apt-get update && apt-get download \ + libc6 && \ + mkdir /dpkg && \ + for deb in *.deb; do dpkg --extract $deb /dpkg || exit 10; done + FROM rust:1.73 as builder -WORKDIR /usr/src/webol +WORKDIR /app COPY . . -# RUN rustup target add armv7-unknown-linux-gnueabihf -# RUN apt update && apt install gcc-arm-linux-gnueabihf -y -# RUN CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc cargo install --path . --target armv7-unknown-linux-gnueabihf -RUN cargo install --path . +RUN cargo build --release -# FROM --platform=arm64 debian:bullseye-slim -FROM debian:trixie-slim -# RUN apt-get update && apt-get install -y libc6 && rm -rf /var/lib/apt/lists/* -WORKDIR /usr/local/webol -COPY --from=builder /usr/local/cargo/bin/webol /usr/local/bin/webol +FROM gcr.io/distroless/cc +COPY --from=builder /app/target/release/webol / +COPY --from=deb_extractor /dpkg / EXPOSE 7229 -CMD ["webol"] +ENTRYPOINT ["./webol"] -- cgit v1.2.3