diff options
author | FxQnLr <[email protected]> | 2023-10-15 17:51:08 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-10-15 17:51:08 +0200 |
commit | e0be33fc23d210dbd630a1bed2fe0ecb2ea6ce0b (patch) | |
tree | 4d7a2e553c0ea67f7aa3c63d788d76d714479fd1 /Dockerfile | |
parent | b0e8aabfb9ea0f4c40a2aa330dd59f07b6c91216 (diff) | |
parent | abd4fbbf0ebd0385f68507eb20f9385db1b96793 (diff) | |
download | webol-e0be33fc23d210dbd630a1bed2fe0ecb2ea6ce0b.tar webol-e0be33fc23d210dbd630a1bed2fe0ecb2ea6ce0b.tar.gz webol-e0be33fc23d210dbd630a1bed2fe0ecb2ea6ce0b.zip |
Merge pull request #2 from FxQnLr/test
Get working actions and build into main
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 27 |
1 files changed, 23 insertions, 4 deletions
@@ -1,7 +1,26 @@ | |||
1 | FROM --platform=arm64 debian:12-slim | 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 | ||
2 | 7 | ||
3 | WORKDIR /usr/local/webol | 8 | FROM lukemathwalker/cargo-chef:latest-rust-1.73.0 as chef |
4 | COPY ./target/armv7-unknown-linux-gnueabihf/release/webol /usr/local/bin/webol | 9 | WORKDIR app |
10 | |||
11 | FROM chef AS planner | ||
12 | COPY . . | ||
13 | RUN cargo chef prepare --recipe-path recipe.json | ||
14 | |||
15 | FROM chef as builder | ||
16 | COPY --from=planner /app/recipe.json recipe.json | ||
17 | RUN cargo chef cook --release --recipe-path recipe.json | ||
18 | COPY . . | ||
19 | RUN cargo build --release | ||
20 | |||
21 | FROM gcr.io/distroless/cc | ||
22 | COPY --from=builder /app/target/release/webol / | ||
23 | COPY --from=deb_extractor /dpkg / | ||
5 | 24 | ||
6 | EXPOSE 7229 | 25 | EXPOSE 7229 |
7 | CMD ["webol"] | 26 | ENTRYPOINT ["./webol"] \ No newline at end of file |