Skip to content

update Dockerfile to not cache builds #1254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/build-push-edge-debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions .github/workflows/build-push-edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
13 changes: 3 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,23 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# build stage
FROM rust:1.84.0-bookworm AS builder

FROM rust:1.84.0-bookworm AS builder

LABEL org.opencontainers.image.title="Parseable"
LABEL maintainer="Parseable Team <[email protected]>"
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
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"]
Loading