aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorfx <[email protected]>2023-10-15 02:26:29 +0200
committerfx <[email protected]>2023-10-15 02:26:29 +0200
commit0948f75248a5daf8229ce1f40d1b3ec8d9aecbac (patch)
tree753359f0a74c44f31e6fa7e9ab5d7d404b8092b9 /Dockerfile
parentd109f789b1cb75fc144a203628694dfb7ed300cb (diff)
downloadwebol-0948f75248a5daf8229ce1f40d1b3ec8d9aecbac.tar
webol-0948f75248a5daf8229ce1f40d1b3ec8d9aecbac.tar.gz
webol-0948f75248a5daf8229ce1f40d1b3ec8d9aecbac.zip
test w/ cargo chef + arm64
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile27
1 files changed, 23 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index d014c5a..5757f0d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,26 @@
1FROM --platform=amd64 debian:bullseye-slim 1FROM debian:bookworm AS deb_extractor
2RUN 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
2 7
3WORKDIR /usr/local/webol 8FROM lukemathwalker/cargo-chef:latest-rust-1.73.0 as chef
4COPY target/armv7-unknown-linux-gnueabihf/release/webol /usr/local/bin/webol 9WORKDIR app
10
11FROM chef AS planner
12COPY . .
13RUN cargo chef prepare --recipe-path recipe.json
14
15FROM chef as builder
16COPY --from=planner /app/recipe.json recipe.json
17RUN cargo chef cook --release --recipe-path recipe.json
18COPY . .
19RUN cargo build --release
20
21FROM gcr.io/distroless/cc
22COPY --from=builder /app/target/release/webol /
23COPY --from=deb_extractor /dpkg /
5 24
6EXPOSE 7229 25EXPOSE 7229
7CMD ["webol"] \ No newline at end of file 26ENTRYPOINT ["./webol"]