You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
405 B
Docker
30 lines
405 B
Docker
ARG GO_VERSION=1.22
|
|
|
|
FROM golang:${GO_VERSION} AS builder
|
|
|
|
WORKDIR /src
|
|
|
|
COPY ./go.mod /src/
|
|
COPY ./go.sum /src/
|
|
|
|
RUN go mod download && go mod verify
|
|
|
|
COPY . /src/
|
|
|
|
RUN CGO_ENABLED=0 \
|
|
go build -o rogueserver
|
|
|
|
RUN chmod +x /src/rogueserver
|
|
|
|
# ---------------------------------------------
|
|
|
|
FROM scratch
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /src/rogueserver .
|
|
|
|
EXPOSE 8001
|
|
|
|
ENTRYPOINT ["./rogueserver"]
|