Spaces:
Build error
Build error
Merge branch 'dockerfile/one-stage-build' of github.com:gstdl/rust-docker-demo-counter-api into dockerfile/multi-stage-build
Browse files- .dockerignore +3 -1
- Dockerfile +6 -3
.dockerignore
CHANGED
|
@@ -14,5 +14,7 @@ Cargo.lock
|
|
| 14 |
*.pdb
|
| 15 |
|
| 16 |
.vscode
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
config.yaml
|
|
|
|
| 14 |
*.pdb
|
| 15 |
|
| 16 |
.vscode
|
| 17 |
+
.gitignore
|
| 18 |
+
README.md
|
| 19 |
|
| 20 |
+
config.yaml
|
Dockerfile
CHANGED
|
@@ -1,9 +1,12 @@
|
|
| 1 |
-
|
| 2 |
-
|
|
|
|
| 3 |
WORKDIR /app
|
|
|
|
| 4 |
COPY . .
|
| 5 |
-
|
| 6 |
RUN apk add --no-cache musl-dev
|
|
|
|
| 7 |
RUN cargo install --path .
|
| 8 |
|
| 9 |
# FROM alpine:3.18
|
|
|
|
| 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 |
|
| 12 |
# FROM alpine:3.18
|