proper labels, bumped default versions

This commit is contained in:
Tamás Gérczei 2020-07-19 09:53:54 +02:00
parent 827087ebc8
commit c2b893bfb3
Signed by: tgerczei
GPG Key ID: 5B59A7760597B1A1
2 changed files with 13 additions and 4 deletions

View File

@ -1,15 +1,17 @@
ARG GOVERSION="1.14.2"
ARG GOVERSION="1.14.6"
FROM golang:${GOVERSION}-alpine AS buildenv
ARG REPO="https://gitea.com/gitea/tea.git"
ARG VERSION="0.3.0"
ARG VERSION="0.4.0"
ENV TEA_VERSION="${VERSION}"
ARG CGO_ENABLED="0"
ARG GOOS="linux"
ARG BUILD_DATE
WORKDIR $GOPATH/src
RUN apk add --quiet --no-cache git && \
@ -25,7 +27,14 @@ RUN apk add --quiet --no-cache git && \
go build -v -a -ldflags "-X main.Version=${TEA_VERSION}" -o /tea .
FROM scratch
LABEL maintainer="Tamás Gérczei <tamas@gerczei.eu>"
LABEL org.opencontainers.image.title="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="${TEA_VERSION}
LABEL org.opencontainers.image.url="https://gitea.com/gitea/tea"
LABEL org.opencontainers.image.authors="Tamás Gérczei <tamas@gerczei.eu>"
LABEL org.opencontainers.image.created="${BUILD_DATE}"
LABEL org.opencontainers.image.source="https://github.com/tgerczei/conteaner"
LABEL org.opencontainers.image.vendor="Gérczei Tamás E.V."
COPY --from=buildenv /tea /
ENV HOME="/app"
ENTRYPOINT ["/tea"]

View File

@ -1,2 +1,2 @@
#!/bin/sh
docker build --build-arg VERSION=development -t $IMAGE_NAME .
docker build --build-arg VERSION=development --build-arg BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ) -t $IMAGE_NAME .