Skip to content

Commit f9685ef

Browse files
committed
dockerfile: build ux-backend-server and devicefinder image
Signed-off-by: Rohan Gupta <[email protected]>
1 parent 337a489 commit f9685ef

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-2
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ COPY config/ config/
1818
COPY metrics/ metrics/
1919
COPY console/ console/
2020
COPY hack/ hack/
21+
COPY services/ services/
2122
COPY main.go Makefile ./
2223

2324
# Build
@@ -28,6 +29,7 @@ RUN make go-build
2829
FROM gcr.io/distroless/static:nonroot
2930
WORKDIR /
3031
COPY --from=builder /workspace/bin/manager .
32+
COPY --from=builder /workspace/bin/ux-backend-server .
3133
USER 65532:65532
3234

3335
ENTRYPOINT ["/manager"]

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ docker-build: godeps-update test-setup go-test ## Build docker image with the ma
108108
docker-push: ## Push docker image with the manager.
109109
docker push ${IMG}
110110

111+
devicefinder-build: ## Build devicefinder binary.
112+
./hack/build-devicefinder.sh
113+
114+
devicefinder-push: ## Push devicefinder image.
115+
docker-push ${DEVICEFINDER_IMAGE}
116+
111117
##@ Deployment
112118

113119
install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.

hack/build-devicefinder.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
set -x
5+
6+
pushd services/devicefinder
7+
podman build -f Dockerfile -t "${DEVICEFINDER_IMAGE}" ../.. \
8+
--build-arg="LDFLAGS=${LDFLAGS}" --platform="linux/amd64"
9+
popd

hack/go-build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ export GO111MODULE=${GO111MODULE:-on}
88
set -x
99

1010
go build -a -o ${GOBIN:-bin}/manager main.go
11+
go build -a -o ${GOBIN:-bin}/ux-backend-server services/ux-backend/main.go

hack/make-bundle-vars.mk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ IMAGE_REGISTRY ?= quay.io
4545
REGISTRY_NAMESPACE ?= ocs-dev
4646
IMAGE_TAG ?= latest
4747
IMAGE_NAME ?= odf-operator
48+
DEVICEFINDER_IMAGE_NAME ?= odf-devicefinder
4849
BUNDLE_IMAGE_NAME ?= $(IMAGE_NAME)-bundle
4950
ODF_DEPS_BUNDLE_NAME ?= odf-dependencies
5051
ODF_DEPS_BUNDLE_IMAGE_NAME ?= $(ODF_DEPS_BUNDLE_NAME)-bundle
@@ -56,6 +57,9 @@ ODF_DEPS_CATALOG_IMAGE_NAME ?= $(ODF_DEPS_BUNDLE_NAME)-catalog
5657
# IMG defines the image used for the operator.
5758
IMG ?= $(IMAGE_REGISTRY)/$(REGISTRY_NAMESPACE)/$(IMAGE_NAME):$(IMAGE_TAG)
5859

60+
# DEVICEFINDER_IMAGE defines the image used for the devicefinder.
61+
DEVICEFINDER_IMAGE ?= $(IMAGE_REGISTRY)/$(REGISTRY_NAMESPACE)/$(DEVICEFINDER_IMAGE_NAME):$(IMAGE_TAG)
62+
5963
# BUNDLE_IMG defines the image used for the bundle.
6064
BUNDLE_IMG ?= $(IMAGE_REGISTRY)/$(REGISTRY_NAMESPACE)/$(BUNDLE_IMAGE_NAME):$(IMAGE_TAG)
6165

@@ -83,9 +87,8 @@ endif
8387
OPERATOR_NAMESPACE ?= openshift-storage
8488

8589
ODF_CONSOLE_IMG ?= quay.io/ocs-dev/odf-console:latest
86-
UX_BACKEND_SERVER_IMAGE ?= quay.io/ocs-dev/ocs-operator:latest
90+
UX_BACKEND_SERVER_IMAGE ?= $(IMG)
8791
UX_BACKEND_OAUTH_IMAGE ?= quay.io/openshift/origin-oauth-proxy:4.20.0
88-
DEVICEFINDER_IMAGE ?= quay.io/ocs-dev/ocs-devicefinder:latest
8992

9093
ODF_DEPS_SUBSCRIPTION_PACKAGE ?= $(ODF_DEPS_BUNDLE_NAME)
9194
ODF_DEPS_SUBSCRIPTION_CHANNEL ?= $(DEFAULT_CHANNEL)

0 commit comments

Comments
 (0)