Gusti Adli Anshari commited on
Commit
95144be
·
unverified ·
1 Parent(s): a8af62d

Add Dockerfile commentary

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -9
Dockerfile CHANGED
@@ -1,9 +1,6 @@
1
- FROM rust:1.77.2-alpine3.18 AS builder
2
-
3
- WORKDIR /app
4
- COPY . .
5
-
6
- RUN apk add --no-cache musl-dev
7
- RUN cargo install --path .
8
-
9
- CMD [ "/usr/local/cargo/bin/rust-rocket-counter-api" ]
 
1
+ FROM rust:1.77.2-alpine3.18 # Base image
2
+ WORKDIR /app # Working directory
3
+ COPY . . # Copy application code and dependencies
4
+ RUN apk add --no-cache musl-dev # Install OS dependencies
5
+ RUN cargo install --path . # Build the application
6
+ CMD [ "/usr/local/cargo/bin/rust-rocket-counter-api" ] # Run the application