Skip to content

Commit 0cf44ba

Browse files
committed
Stop requiring Cargo.lock in image builds
1 parent 46b2178 commit 0cf44ba

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ ENV RUST_LOG=info
2525
# Copy
2626
WORKDIR /usr/src/app
2727
COPY Cargo.toml ./
28-
COPY Cargo.lock ./
2928
COPY .cargo ./.cargo
3029
COPY common ./common
3130
COPY rustiflow ./rustiflow
@@ -37,7 +36,7 @@ COPY ebpf-ipv6 ./ebpf-ipv6
3736
# Build
3837
RUN cargo xtask ebpf-ipv4 --release
3938
RUN cargo xtask ebpf-ipv6 --release
40-
RUN cargo build --release --locked
39+
RUN cargo build --release
4140

4241
# Command
4342
ENTRYPOINT ["/usr/src/app/target/release/rustiflow"]

Dockerfile-slim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ ENV PATH="/root/.cargo/bin:${PATH}"
1818
# Copy source code
1919
WORKDIR /usr/src/app
2020
COPY Cargo.toml ./
21-
COPY Cargo.lock ./
2221
COPY .cargo ./.cargo
2322
COPY common ./common
2423
COPY rustiflow ./rustiflow
@@ -30,7 +29,7 @@ COPY ebpf-ipv6 ./ebpf-ipv6
3029
# Build the project
3130
RUN cargo xtask ebpf-ipv4 --release && \
3231
cargo xtask ebpf-ipv6 --release && \
33-
cargo build --release --locked
32+
cargo build --release
3433

3534
# Stage 2: Runtime
3635
FROM debian:bookworm-slim

0 commit comments

Comments
 (0)