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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user