Files
docker-cli/components/packaging/image/Makefile
Daniel Hiltgen f232ca8480 Switch image name on hub
For the Q3 release the names will be refined slightly, and "ce" will no
longer be used - it's now just the docker engine, with "community" or
"enterprise" at the end if disambiguation is needed.
Upstream-commit: e69e4ea4997e468d20d93247ba19cd5e86daf24f
Component: packaging
2018-08-01 08:03:20 -07:00

30 lines
942 B
Makefile

SHELL:=/bin/bash
ENGINE_DIR:=$(CURDIR)/../../engine
CLI_DIR:=$(CURDIR)/../../cli
VERSION?=0.0.0-dev
STATIC_VERSION=$(shell ../static/gen-static-ver $(ENGINE_DIR) $(VERSION))
DOCKER_HUB_ORG?=docker
ENGINE_IMAGE?=engine-community
.PHONY: help
help: ## show make targets
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.PHONY: clean
clean: ## remove build artifacts
docker rmi $(DOCKER_HUB_ORG)/$(ENGINE_IMAGE):$(STATIC_VERSION)
.PHONY: image
image: image-linux
.PHONY: image-linux
image-linux:
docker build -t $(DOCKER_HUB_ORG)/$(ENGINE_IMAGE):$(STATIC_VERSION) \
--build-arg VERSION=$(STATIC_VERSION) \
--build-arg DOCKER_GITCOMMIT=$(cd $(ENGINE_DIR) && git rev-parse --short=7 HEAD) \
--file ./Dockerfile $(ENGINE_DIR)
.PHONY: release
release:
docker push $(DOCKER_HUB_ORG)/$(ENGINE_IMAGE):$(STATIC_VERSION)