-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.Dockerfile
More file actions
40 lines (29 loc) · 883 Bytes
/
server.Dockerfile
File metadata and controls
40 lines (29 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM docker.io/golang:1.26.1-alpine3.23 AS builder
RUN apk add make
WORKDIR /data/build
RUN mkdir -p common
RUN mkdir -p protocol
RUN mkdir -p server
RUN mkdir -p rpcclient
COPY common/go.mod common
COPY common/go.sum common
COPY protocol/go.mod protocol
COPY protocol/go.sum protocol
COPY server/go.mod server
COPY server/go.sum server
COPY rpcclient/go.mod rpcclient
COPY rpcclient/go.sum rpcclient
RUN cd server && go mod download
RUN cd rpcclient && go mod download
COPY Makefile .
COPY common common
COPY protocol protocol
COPY server server
COPY rpcclient rpcclient
RUN make server
RUN make rpcclient
FROM docker.io/alpine:3.23.3
COPY --from=builder /data/build/server/friendnet-server /usr/bin/server
COPY --from=builder /data/build/rpcclient/friendnet-rpcclient /usr/bin/rpcclient
WORKDIR /var/lib/friendnet
CMD ["server", "-config", "/etc/friendnet/server.json"]