Add org.opencontainers.image.* labels to Dockerfiles

- This should ultimately help for image-to-code back references.
- `org.label-schema.*` labels are now deprecated, in favour of `org.opencontainers.image.*` labels.
  See also: https://github.com/opencontainers/image-spec/blob/master/annotations.md#back-compatibility-with-label-schema
- Git revision (`git rev-parse HEAD`) is now injected at `docker build` time.
This commit is contained in:
Marc Carré
2018-05-11 18:45:49 +01:00
parent 5adb73c561
commit 4e58b83024
16 changed files with 103 additions and 13 deletions

View File

@@ -1,8 +1,14 @@
FROM tatsushid/tinycore-python:2.7
LABEL maintainer="Weaveworks Inc <help@weave.works>"
WORKDIR /home/weave
ADD requirements.txt /home/weave/
RUN pip install -r /home/weave/requirements.txt
ADD echo.py /home/weave/
EXPOSE 5000
ENTRYPOINT ["python", "/home/weave/echo.py"]
ARG revision
LABEL maintainer="Weaveworks <help@weave.works>" \
org.opencontainers.image.title="example-echo" \
org.opencontainers.image.source="https://github.com/weaveworks/scope/tree/master/extras/example/echo" \
org.opencontainers.image.revision="${revision}" \
org.opencontainers.image.vendor="Weaveworks"