kolla/tools/validate-maintainer.sh
Chen 8c463a47a9 Use LABEL instead of MAINTAINER (deprecated) in all Dockerfile.j2
Use LABEL instruction instead of MAINTAINER (deprecated) instruc-
tion as suggested by Docker's official dockerfile guide.
docs.docker.com/engine/reference/builder/#maintainer-deprecated

Closes-Bug: #1683652

Change-Id: Ie87a1ddf31aefcd0b623fd2837d78de420e76898
2017-04-20 16:50:05 +09:00

14 lines
247 B
Bash
Executable File

#!/bin/bash
MAINTAINER='LABEL maintainer="{{ maintainer }}"'
RES=0
for dockerfile in "$@"; do
if ! grep -q "$MAINTAINER" "$dockerfile"; then
echo "ERROR: $dockerfile has incorrect MAINTAINER" >&2
RES=1
fi
done
exit $RES