We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3302c86 commit bc2f756Copy full SHA for bc2f756
Dockerfile
@@ -1,25 +1,13 @@
1
-FROM rust:1.76-slim as builder
+FROM rust:1.85-slim as builder
2
3
WORKDIR /app
4
5
-# Copy the manifest files
6
-COPY Cargo.toml ./
7
-
8
-# Create a dummy source file to build dependencies
9
-RUN mkdir -p src && echo "fn main() {}" > src/main.rs
10
11
-# Build dependencies (this will be cached)
12
-RUN cargo build --release
13
14
-# Remove the dummy source file
15
-RUN rm -rf src
+# Copy Cargo files for dependency caching
+COPY Cargo.toml Cargo.lock* ./
16
17
# Copy the actual source code
18
COPY src ./src
19
20
-# Force a rebuild with the actual source code
21
-RUN touch src/main.rs
22
23
# Build the application
24
RUN cargo build --release
25
0 commit comments