summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorDaniel Wiesenberg <weasy666@gmail.com>2020-07-27 18:10:34 +0200
committerDaniel Wiesenberg <weasy@hotmail.de>2020-08-11 15:38:24 +0200
commita21858758cdefc4978cc5f08d37158a9b3d52f18 (patch)
treeeba9dffc817902a9203cbd2a35d67f355ee9cf96 /Dockerfile
parent624ff08a074348486e352d723af1a7f0ebf76e48 (diff)
downloadconduit-a21858758cdefc4978cc5f08d37158a9b3d52f18.zip
Change labels from label-schema to opencontainer.image
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile28
1 files changed, 16 insertions, 12 deletions
diff --git a/Dockerfile b/Dockerfile
index dc87e0c..5217e65 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -47,21 +47,25 @@ RUN cargo build --release --color=always
# runtime image/container
FROM alpine:3.12
-ARG BUILD_DATE
+ARG CREATED
ARG VERSION
ARG GIT_REF=HEAD
-# Labels inspired by this medium post:
-# https://medium.com/@chamilad/lets-make-your-docker-image-better-than-90-of-existing-ones-8b1e5de950d
-LABEL org.label-schema.build-date=${BUILD_DATE} \
- org.label-schema.name="Conduit" \
- org.label-schema.version=${VERSION} \
- org.label-schema.vendor="Conduit Authors" \
- org.label-schema.description="A Matrix homeserver written in Rust" \
- org.label-schema.url="https://conduit.rs/" \
- org.label-schema.vcs-ref=$GIT_REF \
- org.label-schema.vcs-url="https://git.koesters.xyz/timo/conduit.git" \
- ord.label-schema.docker.build="docker build . -t conduit:latest --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') --build-arg VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml)"\
+# Labels according to https://github.com/opencontainers/image-spec/blob/master/annotations.md
+# including a custom label specifying the build command
+LABEL org.opencontainers.image.created=${CREATED} \
+ org.opencontainers.image.authors="Conduit Contributors, weasy@hotmail.de" \
+ org.opencontainers.image.title="Conduit" \
+ org.opencontainers.image.version=${VERSION} \
+ org.opencontainers.image.vendor="Conduit Contributors" \
+ org.opencontainers.image.description="A Matrix homeserver written in Rust" \
+ org.opencontainers.image.url="https://conduit.rs/" \
+ org.opencontainers.image.revision=$GIT_REF \
+ org.opencontainers.image.source="https://git.koesters.xyz/timo/conduit.git" \
+ org.opencontainers.image.documentation.="" \
+ org.opencontainers.image.licenses="AGPL-3.0" \
+ org.opencontainers.image.ref.name="" \
+ org.label-schema.docker.build="docker build . -t conduit:latest --build-arg CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') --build-arg VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml)"\
maintainer="weasy@hotmail.de"
# Change some Rocket.rs default configs. They can then