diff --git a/Dockerfile b/Dockerfile index 05c1cd6..1c3d952 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,17 @@ -# Builder stage -FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.20-openshift-4.16 AS builder -WORKDIR /go/src/github.com/red-hat-storage/odf-must-gather +FROM registry.ci.openshift.org/ocp/4.16:cli -COPY . . -ENV GO_PACKAGE github.com/red-hat-storage/odf-must-gather +WORKDIR /tmp -# Prod stage -FROM registry.ci.openshift.org/ocp/4.16:cli +COPY . . RUN mkdir -p /templates -COPY --from=builder /go/src/github.com/red-hat-storage/odf-must-gather/collection-scripts/* /usr/bin/ -COPY --from=builder /go/src/github.com/red-hat-storage/odf-must-gather/templates/* /templates/ + +COPY collection-scripts/* /usr/bin/ +COPY templates/* /templates/ # We do not need it as of now # jq is not preinstalled on openshift/origin-cli either # Removing this step makes local development easier. # RUN yum install --setopt=tsflags=nodocs -y jq && yum clean all && rm -rf /var/cache/yum/* -ENTRYPOINT /usr/bin/gather \ No newline at end of file +ENTRYPOINT ["/usr/bin/gather"] diff --git a/Makefile b/Makefile index 3573038..d5404b5 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ endif @oc login --token=$(ODF_MG_TOKEN) --server=https://api.ci.l2s4.p1.openshiftapps.com:6443 1>/dev/null @echo "Logging into the CI image registry..." - @oc registry login --registry registry.ci.openshift.org &>/dev/null + @REGISTRY_AUTH_FILE=~/.docker/config.json oc registry login --registry registry.ci.openshift.org 2>/dev/null @echo "Will be using $(IMG_TAG) as the image tag, you can change this using IMG_TAG env var."