2024-01-29 11:53:36 +00:00
|
|
|
FROM golang:1.21
|
2023-01-08 09:26:04 +00:00
|
|
|
|
2024-01-29 11:53:36 +00:00
|
|
|
WORKDIR /usr/src/app
|
2023-01-08 09:26:04 +00:00
|
|
|
|
2024-01-29 11:53:36 +00:00
|
|
|
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
|
|
|
|
COPY go.mod go.sum ./
|
2024-01-27 16:36:38 +00:00
|
|
|
RUN go mod download && go mod verify
|
2024-01-29 11:53:36 +00:00
|
|
|
|
|
|
|
# build binary and place into /usr/local/bin/
|
|
|
|
COPY . .
|
|
|
|
RUN go build -v -o /usr/local/bin/q3rcon-proxy ./cmd/q3rcon-proxy/
|
2023-01-08 09:26:04 +00:00
|
|
|
|
|
|
|
# Command to run when starting the container
|
2024-01-27 16:36:38 +00:00
|
|
|
ENTRYPOINT [ "q3rcon-proxy" ]
|