summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/test.yml7
-rw-r--r--Dockerfile27
-rw-r--r--Dockerfile.arm.build16
-rw-r--r--Dockerfile.build18
-rw-r--r--build.rs.disabled (renamed from nobuild.rs.old)0
5 files changed, 26 insertions, 42 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index ed9fba6..649f295 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -51,9 +51,8 @@ jobs:
51 id: docker_build 51 id: docker_build
52 uses: docker/build-push-action@v3 52 uses: docker/build-push-action@v3
53 with: 53 with:
54 file: Dockerfile.build
55 push: true 54 push: true
56 platforms: linux/amd64,linux/arm/v7 55 platforms: linux/amd64,linux/arm64
57 tags: | 56 tags: |
58 ghcr.io/fxqnlr/webol:test-latest 57 ghcr.io/fxqnlr/webol:latest
59 ghcr.io/fxqnlr/webol:test-${{ github.run_number }} 58 ghcr.io/fxqnlr/webol:${{ github.run_number }} \ No newline at end of file
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"]
diff --git a/Dockerfile.arm.build b/Dockerfile.arm.build
deleted file mode 100644
index 1845afe..0000000
--- a/Dockerfile.arm.build
+++ /dev/null
@@ -1,16 +0,0 @@
1FROM rust:1.73 as builder
2WORKDIR /usr/src/webol
3COPY . .
4#RUN rustup target add armv7-unknown-linux-gnueabihf
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
7RUN cargo install --path .
8
9#FROM --platform=arm64 debian:bookworm-slim
10FROM debian:bookworm-slim
11RUN apt update && apt install -y libc6 && rm -rf /var/lib/apt/lists/*
12WORKDIR /usr/local/webol
13COPY --from=builder /usr/local/cargo/bin/webol /usr/local/bin/webol
14
15EXPOSE 7229
16CMD ["webol"]
diff --git a/Dockerfile.build b/Dockerfile.build
deleted file mode 100644
index 0158b8a..0000000
--- a/Dockerfile.build
+++ /dev/null
@@ -1,18 +0,0 @@
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
7
8FROM rust:1.73 as builder
9WORKDIR /app
10COPY . .
11RUN cargo build --release
12
13FROM gcr.io/distroless/cc
14COPY --from=builder /app/target/release/webol /
15COPY --from=deb_extractor /dpkg /
16
17EXPOSE 7229
18ENTRYPOINT ["./webol"]
diff --git a/nobuild.rs.old b/build.rs.disabled
index 7609593..7609593 100644
--- a/nobuild.rs.old
+++ b/build.rs.disabled