Skip to content

Commit

Permalink
use current .docker dir if present
Browse files Browse the repository at this point in the history
  • Loading branch information
jmelis committed Jan 9, 2019
1 parent 6693dc1 commit 39e17d4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Expand Up @@ -5,13 +5,19 @@ IMAGE_TEST := reconcile-test
IMAGE_NAME := quay.io/app-sre/qontract-reconcile
IMAGE_TAG := $(shell git rev-parse --short=7 HEAD)

ifneq (,$(wildcard $(CURDIR)/.docker))
DOCKER_CONF := $(CURDIR)/.docker
else
DOCKER_CONF := $(HOME)/.docker
endif

build:
@docker build -t $(IMAGE_NAME):latest -f dockerfiles/Dockerfile .
@docker tag $(IMAGE_NAME):latest $(IMAGE_NAME):$(IMAGE_TAG)

push:
@docker push $(IMAGE_NAME):latest
@docker push $(IMAGE_NAME):$(IMAGE_TAG)
@docker --config=$(DOCKER_CONF) push $(IMAGE_NAME):latest
@docker --config=$(DOCKER_CONF) push $(IMAGE_NAME):$(IMAGE_TAG)

build-test:
@docker build -t $(IMAGE_TEST) -f dockerfiles/Dockerfile.test .
Expand Down

0 comments on commit 39e17d4

Please sign in to comment.