add dockerfile for deployment
streamlined with alpine
This commit is contained in:
parent
e37b0a9329
commit
3e8a4b8f87
1 changed files with 14 additions and 0 deletions
14
Dockerfile
Normal file
14
Dockerfile
Normal 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"]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue