Skip to content

Commit 24d1b59

Browse files
committed
fix: cache docker build steps
1 parent a613947 commit 24d1b59

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
# syntax=docker/dockerfile:1.4
12
FROM rust:1.67.0-bullseye as builder
23
WORKDIR /usr/src/edge-runtime
4+
RUN --mount=type=cache,target=/usr/local/cargo/registry \
5+
cargo install cargo-strip
36
COPY . .
4-
RUN cargo clean && \
5-
cargo build -vv --release --target-dir /usr/target
7+
RUN --mount=type=cache,target=/usr/local/cargo/registry --mount=type=cache,target=/usr/target \
8+
cargo build --release --target-dir /usr/target && \
9+
cargo strip
610

711
FROM debian:bullseye-slim
812
RUN apt-get update && apt-get install -y libssl-dev && rm -rf /var/lib/apt/lists/*

cli/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ base = { path = "../base" }
1313
clap = "4.0.29"
1414
env_logger = "0.10.0"
1515
log = { workspace = true }
16+
17+
[profile.release]
18+
strip="debuginfo"

0 commit comments

Comments
 (0)