diff options
author | Konstantin Pavlov <thresh@videolan.org> | 2023-02-13 17:04:24 -0800 |
---|---|---|
committer | Konstantin Pavlov <thresh@videolan.org> | 2023-02-13 17:04:24 -0800 |
commit | eb47174875b9add0a2171c2f1a00ecb8435f496f (patch) | |
tree | 45b64b03805bb18045b9cb056f7d3d63227b3fac /pkg/docker/Makefile | |
parent | a8f21079e056931b5aedb10037d03315d62bb41b (diff) | |
download | unit-eb47174875b9add0a2171c2f1a00ecb8435f496f.tar.gz unit-eb47174875b9add0a2171c2f1a00ecb8435f496f.tar.bz2 |
Docker: added a target to generate Docker library definition.
Diffstat (limited to 'pkg/docker/Makefile')
-rw-r--r-- | pkg/docker/Makefile | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index ac292b56..469fca96 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -92,10 +92,27 @@ build-%: Dockerfile.% docker pull $(CONTAINER_$(call modname, $*)) docker build --no-cache -t unit:$(VERSION)-$* -f Dockerfile.$* . +library: + @echo "# this file is generated via https://github.com/nginx/unit/$(shell git describe --always --abbrev=0 HEAD)/pkg/docker/Makefile" + @echo "" + @echo "Maintainers: Unit Docker Maintainers <docker-maint@nginx.com> (@nginx)" + @echo "GitRepo: https://github.com/nginx/unit.git" + @for mod in $(MODVERSIONS); do \ + echo ""; \ + TAGS="$$mod $${mod%%.*} $$( echo $$mod | tr -d '.0123456789-' )"; \ + TAGS="$$(echo $$TAGS | tr " " "\n" | sort -u -r | tr "\n" "," | sed "s/,/, /g")"; \ + echo "Tags: $(VERSION)-$$mod, $${TAGS%, }"; \ + echo "Architectures: amd64, arm64v8"; \ + echo "GitFetch: refs/heads/packaging"; \ + echo "GitCommit: $(shell git describe --always --abbrev=0 HEAD)"; \ + echo "Directory: pkg/docker"; \ + echo "File: Dockerfile.$$mod"; \ + done + all: $(addprefix Dockerfile., $(MODVERSIONS)) clean: rm -f $(addprefix Dockerfile., $(MODVERSIONS)) rm -rf $(EXPORT_DIR) -.PHONY: default build dockerfiles clean +.PHONY: default build dockerfiles clean library |