Replace binary build with a Docker build
This commit is contained in:
parent
7045b23ed3
commit
ba59b0ab34
|
@ -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
|
|
|
@ -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"]
|
Loading…
Reference in New Issue