Spaces:
Build error
Build error
Gusti Adli Anshari
commited on
Commit
·
28acf4a
1
Parent(s):
2664b7e
fix commentary
Browse files- Dockerfile +12 -6
Dockerfile
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Base image
|
| 2 |
+
FROM rust:1.77.2-alpine3.18
|
| 3 |
+
# Working directory
|
| 4 |
+
WORKDIR /app
|
| 5 |
+
# Copy application code and dependencies
|
| 6 |
+
COPY . .
|
| 7 |
+
# Install OS dependencies
|
| 8 |
+
RUN apk add --no-cache musl-dev
|
| 9 |
+
# Build the application
|
| 10 |
+
RUN cargo install --path .
|
| 11 |
+
# Run the application
|
| 12 |
+
CMD [ "/usr/local/cargo/bin/rust-rocket-counter-api" ]
|