Skip to content

Commit 3191a3a

Browse files
committed
simplify Dockerfile
1 parent e08fd90 commit 3191a3a

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

Dockerfile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1+
###
2+
### Build stage
3+
###
4+
15
FROM rust:1.94.0-alpine AS build
26

37
WORKDIR /app
4-
58
COPY . /app
9+
RUN apk update && apk add git && cargo build --release --locked
610

7-
RUN apk update
8-
RUN apk add git
9-
RUN cargo build --release
11+
##
12+
## Runner
13+
##
1014

1115
FROM alpine:3.23.3 AS runner
1216

17+
RUN apk update && apk add tini
1318
WORKDIR /app
14-
1519
COPY --from=build /app/target/release/pwmp-server /app/pwmp-server
16-
1720
RUN mkdir /app/data
1821

1922
VOLUME ["/app/data"]
2023
EXPOSE 55300
24+
STOPSIGNAL SIGINT
2125

22-
ENTRYPOINT ["/app/pwmp-server", "--config", "/app/data/config.yml"]
26+
ENTRYPOINT ["/sbin/tini", "--"]
27+
CMD ["/app/pwmp-server", "--config", "/app/data/config.yml"]

0 commit comments

Comments
 (0)