Skip to content

Commit

Permalink
Build Function Runner Docker Image (#2729)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmaly authored Feb 4, 2022
1 parent bdb7ae7 commit ccf2449
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion porch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ start-kube-apiserver:

.PHONY: start-function-runner
start-function-runner:
cd func; docker buildx build -t function-runner .
$(MAKE) -C ./func build-image
docker stop function-runner || true
docker rm -f function-runner || true
docker run --detach \
Expand Down
12 changes: 12 additions & 0 deletions porch/func/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

GCP_PROJECT_ID ?= $(shell gcloud config get-value project)
IMAGE_TAG ?= latest
IMAGE_REPO ?= gcr.io/$(GCP_PROJECT_ID)
IMAGE_NAME ?= function-runner
COMPILED_PROTO=evaluator/evaluator_grpc.pb.go evaluator/evaluator.pb.go

all: $(COMPILED_PROTO)
Expand All @@ -23,3 +27,11 @@ $(COMPILED_PROTO): evaluator/evaluator.proto
--go_out=./evaluator --go_opt=paths=source_relative \
--go-grpc_out=./evaluator --go-grpc_opt=paths=source_relative \
./evaluator/evaluator.proto

.PHONY: build-image
build-image:
docker buildx build --tag $(IMAGE_NAME):$(IMAGE_TAG) --tag $(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG) .

.PHONY: push-image
push-image:
docker buildx build --push --tag $(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG) .

0 comments on commit ccf2449

Please sign in to comment.