From beafdb3a3929a970f6c9616130501e7314dbc015 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Thu, 26 Sep 2019 19:14:31 +0800 Subject: [PATCH] fix(docker): fix vcs ref url and add build date as env --- Dockerfiles/alpine.Dockerfile | 3 ++- Dockerfiles/buster.Dockerfile | 3 ++- Dockerfiles/full.Dockerfile | 3 ++- Dockerfiles/ubuntu18.Dockerfile | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfiles/alpine.Dockerfile b/Dockerfiles/alpine.Dockerfile index 13d37310..b8312abf 100644 --- a/Dockerfiles/alpine.Dockerfile +++ b/Dockerfiles/alpine.Dockerfile @@ -5,7 +5,7 @@ ARG BUILD_DATE LABEL maintainer="team@gnes.ai" \ org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url="https://github.com/gnes-ai/gnes" \ + org.label-schema.vcs-url="https://github.com/gnes-ai/gnes/commit/$VCS_REF" \ org.label-schema.build-date=$BUILD_DATE \ org.label-schema.name="GNES is Generic Nerual Elastic Search" @@ -32,5 +32,6 @@ RUN apk add --no-cache \ WORKDIR / ENV GNES_VCS_VERSION=$VCS_REF +ENV GNES_BUILD_DATE=$BUILD_DATE ENTRYPOINT ["gnes"] \ No newline at end of file diff --git a/Dockerfiles/buster.Dockerfile b/Dockerfiles/buster.Dockerfile index 024d2be7..a8551bdd 100644 --- a/Dockerfiles/buster.Dockerfile +++ b/Dockerfiles/buster.Dockerfile @@ -5,7 +5,7 @@ ARG BUILD_DATE LABEL maintainer="team@gnes.ai" \ org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url="https://github.com/gnes-ai/gnes" \ + org.label-schema.vcs-url="https://github.com/gnes-ai/gnes/commit/$VCS_REF" \ org.label-schema.build-date=$BUILD_DATE \ org.label-schema.name="GNES is Generic Nerual Elastic Search" @@ -27,5 +27,6 @@ RUN ln -s locale.h /usr/include/xlocale.h && \ WORKDIR / ENV GNES_VCS_VERSION=$VCS_REF +ENV GNES_BUILD_DATE=$BUILD_DATE ENTRYPOINT ["gnes"] \ No newline at end of file diff --git a/Dockerfiles/full.Dockerfile b/Dockerfiles/full.Dockerfile index 70fcd8da..7e58bb5d 100644 --- a/Dockerfiles/full.Dockerfile +++ b/Dockerfiles/full.Dockerfile @@ -5,7 +5,7 @@ ARG BUILD_DATE LABEL maintainer="team@gnes.ai" \ org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url="https://github.com/gnes-ai/gnes" \ + org.label-schema.vcs-url="https://github.com/gnes-ai/gnes/commit/$VCS_REF" \ org.label-schema.build-date=$BUILD_DATE \ org.label-schema.name="GNES is Generic Nerual Elastic Search" @@ -28,5 +28,6 @@ RUN pip --no-cache-dir install .[all] \ WORKDIR / ENV GNES_VCS_VERSION=$VCS_REF +ENV GNES_BUILD_DATE=$BUILD_DATE ENTRYPOINT ["gnes"] \ No newline at end of file diff --git a/Dockerfiles/ubuntu18.Dockerfile b/Dockerfiles/ubuntu18.Dockerfile index 2fb2da11..5f1d01c9 100644 --- a/Dockerfiles/ubuntu18.Dockerfile +++ b/Dockerfiles/ubuntu18.Dockerfile @@ -5,7 +5,7 @@ ARG BUILD_DATE LABEL maintainer="team@gnes.ai" \ org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url="https://github.com/gnes-ai/gnes" \ + org.label-schema.vcs-url="https://github.com/gnes-ai/gnes/commit/$VCS_REF" \ org.label-schema.build-date=$BUILD_DATE \ org.label-schema.name="GNES is Generic Nerual Elastic Search" @@ -33,5 +33,6 @@ RUN pip3 install . --no-cache-dir --compile && \ WORKDIR / ENV GNES_VCS_VERSION=$VCS_REF +ENV GNES_BUILD_DATE=$BUILD_DATE ENTRYPOINT ["gnes"] \ No newline at end of file