add dockerfile for deployment
Some checks are pending
Test / Format (gofmt) (push) Waiting to run
Test / Lint (golangci-lint) (push) Waiting to run
Test / Test (go test) (push) Blocked by required conditions
Test / Build CLI (go install) (push) Blocked by required conditions

streamlined with alpine
This commit is contained in:
Bhavnoor Singh Saroya 2025-08-18 23:26:09 -07:00
parent e37b0a9329
commit 3e8a4b8f87

14
Dockerfile Normal file
View file

@ -0,0 +1,14 @@
ARG GO_VERSION=1
FROM golang:${GO_VERSION}-alpine as builder
WORKDIR /usr/src/app
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN go build -v -o /run-app ./cli/battlesnake/main.go
FROM alpine:latest
COPY --from=builder /run-app /usr/local/bin/
CMD ["run-app", "host"]