From 2475bffb71e7424390b1913ca4985019fb8a2a8d Mon Sep 17 00:00:00 2001 From: Nitish Tiwari Date: Wed, 19 Mar 2025 22:42:37 +0530 Subject: [PATCH 1/2] update Dockerfile to not cache builds --- .github/workflows/build-push-edge-debug.yaml | 2 -- .github/workflows/build-push-edge.yaml | 2 -- Cargo.lock | 1 - Cargo.toml | 1 - Dockerfile | 13 +++---------- 5 files changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-push-edge-debug.yaml b/.github/workflows/build-push-edge-debug.yaml index bb619eb80..cf58b5d65 100644 --- a/.github/workflows/build-push-edge-debug.yaml +++ b/.github/workflows/build-push-edge-debug.yaml @@ -45,5 +45,3 @@ jobs: push: true tags: parseable/parseable:edge-debug platforms: linux/amd64,linux/arm64 - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/.github/workflows/build-push-edge.yaml b/.github/workflows/build-push-edge.yaml index ccd0bb123..0ca048213 100644 --- a/.github/workflows/build-push-edge.yaml +++ b/.github/workflows/build-push-edge.yaml @@ -45,5 +45,3 @@ jobs: push: true tags: parseable/parseable:edge platforms: linux/amd64,linux/arm64 - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/Cargo.lock b/Cargo.lock index ddfa68a22..85ae8aa77 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3527,7 +3527,6 @@ dependencies = [ "uptime_lib", "ureq", "url", - "vergen", "vergen-gitcl", "xxhash-rust", "zip", diff --git a/Cargo.toml b/Cargo.toml index fc2170091..ce0f3308b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -128,7 +128,6 @@ sha1_smol = { version = "1.0", features = ["std"] } static-files = "0.2" ureq = "2.12" url = "2.5" -vergen = { version = "9.0", features = ["build", "cargo", "rustc", "si"] } vergen-gitcl = { version = "1.0", features = ["build", "cargo", "rustc", "si"] } zip = { version = "2.3", default-features = false, features = ["deflate"] } anyhow = "1.0" diff --git a/Dockerfile b/Dockerfile index a9980e8d9..1b6d6f51f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,7 @@ # along with this program. If not, see . # build stage -FROM rust:1.84.0-bookworm AS builder - +FROM rust:1.83.0-bookworm as builder LABEL org.opencontainers.image.title="Parseable" LABEL maintainer="Parseable Team " @@ -23,13 +22,7 @@ LABEL org.opencontainers.image.vendor="Parseable Inc" LABEL org.opencontainers.image.licenses="AGPL-3.0" WORKDIR /parseable - -# Cache dependencies -COPY Cargo.toml Cargo.lock build.rs ./ -RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src - -# Build the actual binary -COPY src ./src +COPY . . RUN cargo build --release # final stage @@ -37,7 +30,7 @@ FROM gcr.io/distroless/cc-debian12:latest WORKDIR /parseable -# Copy the static binary into the final image +# Copy the static shell into base image. COPY --from=builder /parseable/target/release/parseable /usr/bin/parseable CMD ["/usr/bin/parseable"] From 320df04ed52e6a8dbb2a188c8a7582368a4cda1b Mon Sep 17 00:00:00 2001 From: Nitish Tiwari Date: Thu, 20 Mar 2025 07:15:40 +0530 Subject: [PATCH 2/2] update --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1b6d6f51f..a2e490fd2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ # along with this program. If not, see . # build stage -FROM rust:1.83.0-bookworm as builder +FROM rust:1.84.0-bookworm AS builder LABEL org.opencontainers.image.title="Parseable" LABEL maintainer="Parseable Team "