mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-15 05:38:51 +00:00
Add Dockerfile
This commit is contained in:
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM docker.io/openshift/origin-release:golang-1.13 AS builder
|
||||
WORKDIR /go/src/github.com/open-cluster-management/work
|
||||
COPY . .
|
||||
ENV GO_PACKAGE github.com/open-cluster-management/nucleus
|
||||
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/nucleus/nucleus /
|
||||
10
Makefile
10
Makefile
@@ -2,6 +2,8 @@
|
||||
all: build
|
||||
.PHONY: all
|
||||
|
||||
IMAGE_REGISTRY?=quay.io
|
||||
|
||||
# Include the library makefile
|
||||
include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \
|
||||
golang.mk \
|
||||
@@ -18,6 +20,14 @@ copy-crd:
|
||||
|
||||
update-all: copy-crd update
|
||||
|
||||
# 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,nucleus,$(IMAGE_REGISTRY)/open-cluster-management/nucleus,./Dockerfile,.)
|
||||
|
||||
clean:
|
||||
$(RM) ./nucleus
|
||||
.PHONY: clean
|
||||
|
||||
Reference in New Issue
Block a user