2021-12-07 18:10:53 +00:00
|
|
|
FROM golang:alpine as builder
|
2021-12-07 14:49:58 +00:00
|
|
|
|
2021-12-08 10:07:31 +00:00
|
|
|
RUN apk add --no-cache gcc libgo git
|
2021-12-07 14:49:58 +00:00
|
|
|
|
2021-12-07 17:09:14 +00:00
|
|
|
WORKDIR /go/src/git.ucode.space/goshorly
|
2021-12-07 15:15:19 +00:00
|
|
|
COPY . .
|
2021-12-07 14:49:58 +00:00
|
|
|
|
2021-12-07 15:15:19 +00:00
|
|
|
RUN go get -d -v ./...
|
2022-01-06 17:09:37 +00:00
|
|
|
RUN chmod +x build-ci.sh
|
2022-01-06 17:26:24 +00:00
|
|
|
RUN /go/src/git.ucode.space/goshorly/build-ci.sh
|
2021-12-07 17:09:14 +00:00
|
|
|
|
2021-12-07 18:10:53 +00:00
|
|
|
FROM scratch as production
|
|
|
|
WORKDIR /goshorly
|
2022-01-05 22:44:11 +00:00
|
|
|
COPY --from=builder /go/src/git.ucode.space/goshorly/app /goshorly/app
|
2021-12-07 18:10:53 +00:00
|
|
|
CMD ["./app"]
|