Files
docker-cli/dockerfiles/Dockerfile.authors
Sebastiaan van Stijn 994d6b7fc2 Dockerfile: use syntax=docker/dockerfile:1
Now that HEREDOC is included in the stable Dockerfile syntax, we can
use the latest stable syntax for all Dockerfiles.

The recommendation for the stable syntax is to use `:1` (which is
equivalent to "latest" stable syntax.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-17 10:40:17 +01:00

24 lines
525 B
Docker

# syntax=docker/dockerfile:1
FROM alpine:3.14 AS gen
RUN apk add --no-cache bash git
WORKDIR /src
RUN --mount=type=bind,target=. \
mkdir /out && ./scripts/docs/generate-authors.sh /out
FROM scratch AS update
COPY --from=gen /out /
FROM gen AS validate
RUN --mount=type=bind,target=.,rw <<EOT
set -e
git add -A
cp -rf /out/* .
diff=$(git status --porcelain -- AUTHORS)
if [ -n "$diff" ]; then
echo >&2 'ERROR: Authors result differs. Please update with "make -f docker.Makefile authors"'
echo "$diff"
exit 1
fi
EOT