Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Function Runner Docker Image #2729

Merged
merged 1 commit into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) .
martinmaly marked this conversation as resolved.
Show resolved Hide resolved

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