Add a cloud run service.
This commit is contained in:
@@ -12,6 +12,7 @@ endif
|
||||
.RECIPEPREFIX = >
|
||||
|
||||
IMAGE_NAME:= gateway-test
|
||||
REMOTE_REPO:=harbor.fizz.buzz/library
|
||||
TARGET :=
|
||||
|
||||
.PHONY: help
|
||||
@@ -22,6 +23,16 @@ help:
|
||||
build: ## Build the docker image.
|
||||
> docker build --tag $(IMAGE_NAME) --target=$(TARGET) --file Dockerfile ../
|
||||
|
||||
.PHONY: push
|
||||
push: ## Push the docker image to a remote repository.
|
||||
push: build
|
||||
ifdef REMOTE_REPO
|
||||
> docker tag $(IMAGE_NAME) $(REMOTE_REPO)/$(IMAGE_NAME)
|
||||
> docker push $(REMOTE_REPO)/$(IMAGE_NAME)
|
||||
else
|
||||
> @echo "REMOTE_REPO not defined, not pushing to a remote repo."
|
||||
endif
|
||||
|
||||
.PHONY: shell
|
||||
shell: ## Launch an interactive shell inside the docker image.
|
||||
shell: build
|
||||
@@ -30,3 +41,8 @@ shell: build
|
||||
.PHONY: clean
|
||||
clean:
|
||||
> docker rmi $(IMAGE_NAME)
|
||||
ifdef REMOTE_REPO
|
||||
> docker rmi $(REMOTE_REPO)/$(IMAGE_NAME)
|
||||
else
|
||||
> @echo "REMOTE_REPO not defined, not removing from remote repo."
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user