From ec4451570a58690b094b298b55a64aa0c4cb40dc Mon Sep 17 00:00:00 2001 From: Jian Qiu Date: Mon, 27 Apr 2020 18:03:47 +0800 Subject: [PATCH 1/2] Add docker file --- Dockerfile | 9 +++++++++ Makefile | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..aea4cd884 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM docker.io/openshift/origin-release:golang-1.13 AS builder +WORKDIR /go/src/github.com/open-cluster-management/registration +COPY . . +ENV GO_PACKAGE github.com/open-cluster-management/registration +RUN make build --warn-undefined-variables + +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1-398 + +COPY --from=builder /go/src/github.com/open-cluster-management/registration/registration / diff --git a/Makefile b/Makefile index cdb18ff31..9e0186503 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,17 @@ include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \ targets/openshift/bindata.mk \ ) +IMAGE_REGISTRY?=quay.io + $(call add-bindata,spokecluster,./pkg/hub/spokecluster/manifests/...,bindata,bindata,./pkg/hub/spokecluster/bindata/bindata.go) +# This will call a macro called "build-image" which will generate image specific targets based on the parameters: +# $0 - macro name +# $1 - target suffix +# $2 - Dockerfile path +# $3 - context directory for image build +# It will generate target "image-$(1)" for builing the image an binding it as a prerequisite to target "images". +$(call build-image,registration,$(IMAGE_REGISTRY)/open-cluster-management/registration,./Dockerfile,.) + clean: $(RM) ./registration From 9c2a67e79b1a27b3fd4eee2c01304a44b675f2f8 Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Tue, 28 Apr 2020 11:48:30 -0400 Subject: [PATCH 2/2] Tiny update to README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cb8b82eed..afdc55e30 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Cluster Registration -Support the registration of clusters to a hub to place them under management. +Contains controllers that support the registration of spoke clusters to a hub to +place them under management. ## Community, discussion, contribution, and support