diff options
Diffstat (limited to 'Dockerfile.build')
-rw-r--r-- | Dockerfile.build | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/Dockerfile.build b/Dockerfile.build index 3bbaf39..0158b8a 100644 --- a/Dockerfile.build +++ b/Dockerfile.build | |||
@@ -1,16 +1,18 @@ | |||
1 | FROM debian:bookworm AS deb_extractor | ||
2 | RUN cd /tmp && \ | ||
3 | apt-get update && apt-get download \ | ||
4 | libc6 && \ | ||
5 | mkdir /dpkg && \ | ||
6 | for deb in *.deb; do dpkg --extract $deb /dpkg || exit 10; done | ||
7 | |||
1 | FROM rust:1.73 as builder | 8 | FROM rust:1.73 as builder |
2 | WORKDIR /usr/src/webol | 9 | WORKDIR /app |
3 | COPY . . | 10 | COPY . . |
4 | # RUN rustup target add armv7-unknown-linux-gnueabihf | 11 | RUN cargo build --release |
5 | # RUN apt update && apt install gcc-arm-linux-gnueabihf -y | ||
6 | # RUN CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc cargo install --path . --target armv7-unknown-linux-gnueabihf | ||
7 | RUN cargo install --path . | ||
8 | 12 | ||
9 | # FROM --platform=arm64 debian:bullseye-slim | 13 | FROM gcr.io/distroless/cc |
10 | FROM debian:trixie-slim | 14 | COPY --from=builder /app/target/release/webol / |
11 | # RUN apt-get update && apt-get install -y libc6 && rm -rf /var/lib/apt/lists/* | 15 | COPY --from=deb_extractor /dpkg / |
12 | WORKDIR /usr/local/webol | ||
13 | COPY --from=builder /usr/local/cargo/bin/webol /usr/local/bin/webol | ||
14 | 16 | ||
15 | EXPOSE 7229 | 17 | EXPOSE 7229 |
16 | CMD ["webol"] | 18 | ENTRYPOINT ["./webol"] |