Skip to content

Commit ca2be8e

Browse files
author
Alfonso Acosta
authored
Fix the format of org.label-schema.build-date
The [convention draft](http://label-schema.org/rc1/) clearly states that `org.label-schema.build-date` should be in [RFC 3339](https://tools.ietf.org/html/rfc3339) format: > This label contains the Date/Time the image was built. The value SHOULD be formatted according to RFC 3339. Addresses CentOS/sig-cloud-instance-images#100 (comment)
1 parent 7135fb2 commit ca2be8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docker/containerbuild.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ mv /var/tmp/"$KSNAME"-docker.tar.xz $BUILDROOT/docker/
6363

6464
# Create a Dockerfile to go along with the rootfs.
6565

66+
BUILDDATE_RFC3339="$(date -d $BUILDDATE --rfc-3339=date)"
6667
cat << EOF > $BUILDROOT/docker/Dockerfile
6768
FROM scratch
6869
ADD $KSNAME-docker.tar.xz /
@@ -71,7 +72,7 @@ LABEL org.label-schema.schema-version="1.0" \\
7172
org.label-schema.name="CentOS Base Image" \\
7273
org.label-schema.vendor="CentOS" \\
7374
org.label-schema.license="GPLv2" \\
74-
org.label-schema.build-date="$BUILDDATE"
75+
org.label-schema.build-date="$BUILDDATE_RFC3339"
7576
7677
CMD ["/bin/bash"]
7778
EOF

0 commit comments

Comments
 (0)