2021-03-30 19:13:23 +08:00
|
|
|
ARG GOVERSION="1.16.2"
|
|
|
|
|
|
|
|
FROM golang:${GOVERSION}-alpine AS buildenv
|
|
|
|
|
|
|
|
ARG GOOS="linux"
|
|
|
|
|
|
|
|
COPY . $GOPATH/src/
|
|
|
|
WORKDIR $GOPATH/src
|
|
|
|
|
|
|
|
RUN apk add --quiet --no-cache \
|
2021-09-24 00:01:07 +08:00
|
|
|
build-base \
|
2021-03-30 19:13:23 +08:00
|
|
|
make \
|
|
|
|
git && \
|
2021-09-24 00:01:07 +08:00
|
|
|
make clean build STATIC=true
|
2021-03-30 19:13:23 +08:00
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
ARG VERSION="0.7.0"
|
|
|
|
LABEL org.opencontainers.image.title="tea - CLI for Gitea - git with a cup of tea"
|
|
|
|
LABEL org.opencontainers.image.description="A command line tool to interact with Gitea servers"
|
|
|
|
LABEL org.opencontainers.image.version="${VERSION}"
|
|
|
|
LABEL org.opencontainers.image.authors="Tamás Gérczei <tamas@gerczei.eu>"
|
|
|
|
LABEL org.opencontainers.image.vendor="The Gitea Authors"
|
|
|
|
COPY --from=buildenv /go/src/tea /
|
|
|
|
ENV HOME="/app"
|
|
|
|
ENTRYPOINT ["/tea"]
|