.PHONY: all build push push-latest

all: build push push-latest

VERSION := $(shell date +%Y-%m-%dT%H.%M)

build:
	docker build -t security/ubuntu-bionic .

push:
	docker tag security/ubuntu-bionic "registry.yandex.net/security/ubuntu-bionic:${VERSION}"
	docker push "registry.yandex.net/security/ubuntu-bionic:${VERSION}"
	@echo
	@echo "Well done!"
	@echo "Uploaded: registry.yandex.net/security/ubuntu-bionic:$(VERSION)"

push-latest:
	docker tag security/ubuntu-bionic "registry.yandex.net/security/ubuntu-bionic:latest"
	docker push "registry.yandex.net/security/ubuntu-bionic:latest"
	@echo
	@echo "Well done!"
	@echo "Uploaded: registry.yandex.net/security/ubuntu-bionic:latest"
