Replace binary build with a Docker build

This commit is contained in:
kaiyou 2020-06-17 15:35:02 +02:00
parent 7045b23ed3
commit ba59b0ab34
2 changed files with 10 additions and 16 deletions

View File

@ -1,16 +0,0 @@
image: golang:1.13.9-alpine
stages:
- build
build:
stage: build
script:
- apk add --no-cache make
- make release GOARCHES="amd64 arm arm64"
only:
- branches
artifacts:
paths:
- wesher-*
expire_in: 8 weeks

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM golang:1.14-alpine
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o wesher .
FROM alpine:latest
COPY --from=0 /app/wesher /wesher
ENTRYPOINT ["/wesher"]