File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 3535define push_image
3636 @# echo local image name $(1)
3737 @ID=$$(docker images $(1 ) --format '{{.ID}}' ) ; \
38- RID=$$(curl -s -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' $(REGISTRY ) /v2/$(1 ) /manifests/$(VERSION ) |python -c 'import json; import sys; print(json.load(sys.stdin ) ["config"]["digest"].split(":")[1])'); \
38+ RID2=$$(curl -s -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' $(REGISTRY ) /v2/$(1 ) /manifests/$(VERSION ) ) ; \
39+ if [[ "$${RID2}" != "" ]]; then \
40+ RID=$$(echo $${RID2}|python -c 'import json; import sys; print(json.load(sys.stdin ) ["config"]["digest"].split(":")[1])'); \
41+ else \
42+ RID=""; \
43+ fi; \
3944 if [[ "$${RID}" == "$${ID}"* ]]; then \
4045 echo "Already pushed local image $(1 ) ($${ID}) as $(REGISTRY ) /$(1 ) :$(VERSION ) ($${RID})"; \
4146 else \
You can’t perform that action at this time.
0 commit comments