Add a cloud run service.

This commit is contained in:
Tom Alexander
2024-10-15 20:45:34 -04:00
parent e1e31d0ca3
commit f0160a8abd
5 changed files with 83 additions and 31 deletions

View File

@@ -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