-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathserver.Dockerfile
More file actions
46 lines (35 loc) · 1.01 KB
/
server.Dockerfile
File metadata and controls
46 lines (35 loc) · 1.01 KB
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
41
42
43
44
45
46
FROM docker.io/golang:1.26.2-alpine3.23 AS builder
RUN apk add make nodejs npm
WORKDIR /data/build
RUN mkdir -p common
RUN mkdir -p updater
RUN mkdir -p protocol
RUN mkdir -p adminui
RUN mkdir -p server
RUN mkdir -p rpcclient
COPY common/go.mod common
COPY common/go.sum common
COPY updater/go.mod updater
COPY protocol/go.mod protocol
COPY protocol/go.sum protocol
COPY adminui/go.mod adminui
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 updater updater
COPY protocol protocol
COPY adminui adminui
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"]