Skip to content

Commit

Permalink
Misc-fixes (#139)
Browse files Browse the repository at this point in the history
* add missing oc scripts in downstream dockerfile

* skip dependencies check to force versions

* rely on brew image for downstream

* fix image url
  • Loading branch information
jpinsonneau authored Dec 17, 2024
1 parent 60f4c66 commit 8c5a132
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 8 additions & 0 deletions Dockerfile.downstream
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
ARG TARGETARCH=amd64
ARG COMMIT

# Make kubectl & oc scripts available for copy
FROM registry.redhat.io/openshift4/ose-cli-rhel9:v4.17.0-202412032103.p0.g13001b0.assembly.stream.el9 as ose-cli

# Build the manager binary
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.22.5-202407301806.g4c8b32d.el9 as builder

Expand Down Expand Up @@ -34,8 +37,13 @@ RUN mkdir -p output
# Create final image from ubi + built binary and command
FROM --platform=linux/$TARGETARCH registry.access.redhat.com/ubi9/ubi:9.4
WORKDIR /

COPY --from=builder /opt/app-root/build .
COPY --from=builder --chown=65532:65532 /opt/app-root/output /output

COPY --from=ose-cli /usr/bin/kubectl /usr/bin/kubectl
COPY --from=ose-cli /usr/bin/oc /usr/bin/oc

USER 65532:65532

ENTRYPOINT ["/network-observability-cli"]
Expand Down
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,10 @@ prepare:
mkdir -p tmp

.PHONY: prereqs
prereqs: ## Test if prerequisites are met, and installing missing dependencies
@echo "### Test if prerequisites are met, and installing missing dependencies"
ifeq (, $(shell which golangci-lint))
prereqs: ## Install dependencies
@echo "### Installing dependencies"
GOFLAGS="" go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}
endif
ifeq (, $(shell which yq))
GOFLAGS="" go install github.com/mikefarah/yq/v4@${YQ_VERSION}
endif

.PHONY: vendors
vendors: ## Refresh vendors directory.
Expand Down

0 comments on commit 8c5a132

Please sign in to comment.