mirror of
https://github.com/onyx-and-iris/q3rcon-proxy.git
synced 2025-04-11 08:03:53 +01:00
Compare commits
2 Commits
c42df03858
...
8cb5bc03c5
Author | SHA1 | Date | |
---|---|---|---|
8cb5bc03c5 | |||
939d419438 |
15
Dockerfile
15
Dockerfile
@ -1,4 +1,4 @@
|
||||
FROM golang:1.21
|
||||
FROM golang:1.21 AS build_image
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
@ -6,9 +6,16 @@ WORKDIR /usr/src/app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download && go mod verify
|
||||
|
||||
# build binary and place into /usr/local/bin/
|
||||
COPY . .
|
||||
RUN go build -v -o /usr/local/bin/q3rcon-proxy ./cmd/q3rcon-proxy/
|
||||
|
||||
# build binary, place into ./bin/
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o ./bin/q3rcon-proxy ./cmd/q3rcon-proxy/
|
||||
|
||||
FROM scratch AS final_image
|
||||
|
||||
WORKDIR /bin/
|
||||
|
||||
COPY --from=build_image /usr/src/app/bin/q3rcon-proxy .
|
||||
|
||||
# Command to run when starting the container
|
||||
ENTRYPOINT [ "q3rcon-proxy" ]
|
||||
ENTRYPOINT [ "./q3rcon-proxy" ]
|
Loading…
x
Reference in New Issue
Block a user