fix: Make Cargo.lock optional in Docker build

Cargo.lock may not exist before first build. Use wildcard copy
so Docker doesn't fail if lockfile is missing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell
2026-02-15 00:45:04 -05:00
parent d91ceb5b24
commit 2c3688c914

View File

@@ -7,7 +7,8 @@ RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static
WORKDIR /build
# Cache dependencies — copy manifests first
COPY Cargo.toml Cargo.lock ./
COPY Cargo.toml ./
COPY Cargo.lock* ./
RUN mkdir src && echo "fn main() {}" > src/main.rs
RUN cargo build --release 2>/dev/null || true