forked from Kei-Luna/hkrpg-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
207 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM golang:1.23-alpine as builder | ||
LABEL authors="gucooing" | ||
|
||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories | ||
RUN apk add --no-cache gcc musl-dev linux-headers | ||
WORKDIR /usr/hkrpg | ||
ADD go.mod . | ||
ADD go.sum . | ||
RUN go env -w GO111MODULE=on | ||
RUN go env -w GOPROXY=https://goproxy.cn,direct | ||
ENV CGO_ENABLED=1 | ||
RUN go mod download && go mod verify | ||
COPY . . | ||
RUN go build -tags netgo -o /usr/hkrpg/hkrpg-go hkrpg-go-pe.go | ||
|
||
FROM alpine:latest | ||
WORKDIR /usr/hkrpg | ||
COPY --from=builder /usr/hkrpg/hkrpg-go /usr/hkrpg/hkrpg-go | ||
COPY --from=builder /usr/hkrpg/data/ /usr/hkrpg/data/ | ||
EXPOSE 8080/tcp 20041/udp | ||
ENTRYPOINT ["./hkrpg-go"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters