Skip to content
Snippets Groups Projects
Commit 19252dd6 authored by Markus Frosch's avatar Markus Frosch
Browse files

Add latest tag for x86_64

parent 6d4f5061
No related branches found
No related tags found
No related merge requests found
Pipeline #2510 failed
......@@ -14,6 +14,12 @@ FROM := $(shell grep FROM Dockerfile | cut -d" " -f2)
VERSION := $(shell basename `pwd`)
IMAGE := $(IMAGE_PREFIX)$(VERSION):$(VARIANT)
ifeq ($(VARIANT),x86_64)
IMAGE_EXTRA := $(IMAGE_PREFIX)$(DIST):latest
else
IMAGE_EXTRA :=
endif
all: pull build
pull:
......@@ -21,10 +27,16 @@ pull:
docker pull "$(FROM)"
build:
docker build --cache-from "$(IMAGE)" --tag "$(IMAGE)" .
docker build --cache-from "${IMAGE}" --tag "$(IMAGE)" .
ifneq ($(IMAGE_EXTRA),)
docker tag "$(IMAGE)" "$(IMAGE_EXTRA)"
endif
push:
docker push "$(IMAGE)"
ifneq ($(IMAGE_EXTRA),)
docker push "$(IMAGE_EXTRA)"
endif
clean:
if (docker inspect --type image "$(IMAGE)" >/dev/null 2>&1); then docker rmi "$(IMAGE)"; fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment