File tree Expand file tree Collapse file tree 2 files changed +35
-4
lines changed
Expand file tree Collapse file tree 2 files changed +35
-4
lines changed Original file line number Diff line number Diff line change 1+ # Build stage: use Alpine with build tools
2+ FROM alpine:3.22.1 AS builder
3+
4+ WORKDIR /usr/src
5+
6+ RUN apk add --no-cache gcc musl-dev make
7+
8+ COPY ./src .
9+
10+ RUN make release
11+
12+ # Assemble runtime image
13+ FROM alpine:3.22.1
14+
15+ COPY --from=builder /usr/src/mpdirectory .
16+
17+ RUN adduser -D -g "mpdirectory user" mpdirectory
18+
19+ USER mpdirectory
20+
21+ ENTRYPOINT ["/mpdirectory" ]
22+
23+ CMD ["-h" ]
24+
25+ EXPOSE 27950/udp
Original file line number Diff line number Diff line change @@ -29,8 +29,14 @@ to compile the debug version
2929The resulting binary is just called ` mpdirectory `
3030
3131## Docker
32+
33+ Build OCI
34+ ``` bash
35+ docker build -t mpdirectory .
3236```
33- git clone https://github.com/nuclearmonster/mpdirectory_docker
34- cd mpdirectory
35- docker compose up -d
36- ```
37+
38+ Running as a container
39+
40+ ``` bash
41+ docker run --rm -p 27950:27950/udp mpdirectory -f
42+ ```
You can’t perform that action at this time.
0 commit comments