Skip to content

Commit

Permalink
Added docker-build & docker-push targets to Makefile (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosta91 authored Mar 18, 2024
1 parent 6d5e10b commit 7135fcf
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,23 @@ report-celery-beat:

admin-user:
superset fab create-admin

############ Docker image targets ############

AIRGAP_REGISTRY ?= lr1-bd-harbor-registry.mip.storage.hpecorp.net/develop
IMG_NAME := gcr.io/mapr-252711/superset/superset
GIT_HASH := $(shell git log -n1 --pretty=%h)
IS_DIRTY := $(shell git diff-index --quiet HEAD -- || echo "-is-dirty")
IMG_TAG ?= 3.1.0-hpe-ezaf-$(GIT_HASH)$(IS_DIRTY)

docker-build:
docker build . -t $(IMG_NAME):$(IMG_TAG)
$(ifneq(,$(AIRGAP_REGISTRY)))
docker tag $(IMG_NAME):$(IMG_TAG) $(AIRGAP_REGISTRY)/$(IMG_NAME):$(IMG_TAG)
$(endif)

docker-push:
docker push $(IMG_NAME):$(IMG_TAG)
$(ifneq(,$(AIRGAP_REGISTRY)))
docker push $(AIRGAP_REGISTRY)/$(IMG_NAME):$(IMG_TAG)
$(endif)

0 comments on commit 7135fcf

Please sign in to comment.