fix docker hub image generation

This commit is contained in:
aler9 2020-07-20 15:53:01 +02:00
parent 8f0535b673
commit dfa0873919

View File

@ -156,6 +156,7 @@ dockerhub:
$(eval VERSION := $(shell git describe --tags))
docker buildx rm builder 2>/dev/null || true
rm -rf $$HOME/.docker/manifests/*
docker buildx create --name=builder --use
echo "$$DOCKERFILE_IMAGE" | docker buildx build . -f - --build-arg VERSION=$(VERSION) \
@ -170,24 +171,25 @@ dockerhub:
echo "$$DOCKERFILE_IMAGE" | docker buildx build . -f - --build-arg VERSION=$(VERSION) \
--push -t aler9/rtsp-simple-server:$(VERSION)-arm64v8 --build-arg OPTS="GOOS=linux GOARCH=arm64" --platform=linux/arm64/v8
docker manifest create --amend aler9/rtsp-simple-server:$(VERSION) \
docker manifest create aler9/rtsp-simple-server:$(VERSION) \
$(foreach ARCH,amd64 armv6 armv7 arm64v8,aler9/rtsp-simple-server:$(VERSION)-$(ARCH))
docker manifest push aler9/rtsp-simple-server:$(VERSION)
docker manifest create --amend aler9/rtsp-simple-server:latest-amd64 aler9/rtsp-simple-server:$(VERSION)-amd64
docker manifest create aler9/rtsp-simple-server:latest-amd64 aler9/rtsp-simple-server:$(VERSION)-amd64
docker manifest push aler9/rtsp-simple-server:latest-amd64
docker manifest create --amend aler9/rtsp-simple-server:latest-armv6 aler9/rtsp-simple-server:$(VERSION)-armv6
docker manifest create aler9/rtsp-simple-server:latest-armv6 aler9/rtsp-simple-server:$(VERSION)-armv6
docker manifest push aler9/rtsp-simple-server:latest-armv6
docker manifest create --amend aler9/rtsp-simple-server:latest-armv7 aler9/rtsp-simple-server:$(VERSION)-armv7
docker manifest create aler9/rtsp-simple-server:latest-armv7 aler9/rtsp-simple-server:$(VERSION)-armv7
docker manifest push aler9/rtsp-simple-server:latest-armv7
docker manifest create --amend aler9/rtsp-simple-server:latest-arm64v8 aler9/rtsp-simple-server:$(VERSION)-arm64v8
docker manifest create aler9/rtsp-simple-server:latest-arm64v8 aler9/rtsp-simple-server:$(VERSION)-arm64v8
docker manifest push aler9/rtsp-simple-server:latest-arm64v8
docker manifest create --amend aler9/rtsp-simple-server:latest \
$(foreach ARCH,amd64 armv6 armv7 arm64v8,aler9/rtsp-simple-server:latest-$(ARCH))
docker manifest create aler9/rtsp-simple-server:latest \
$(foreach ARCH,amd64 armv6 armv7 arm64v8,aler9/rtsp-simple-server:$(VERSION)-$(ARCH))
docker manifest push aler9/rtsp-simple-server:latest
docker buildx rm builder
rm -rf $$HOME/.docker/manifests/*