Skip to content

Commit 1fd1001

Browse files
Dockerfiles: Simplify copy commands
Co-authored-by: Hongkai Liu <[email protected]>
1 parent 5612dcc commit 1fd1001

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ WORKDIR /go/src/github.com/openshift/cluster-version-operator
33
COPY . .
44
RUN hack/build-go.sh; \
55
mkdir -p /tmp/build; \
6-
cp _output/linux/$(go env GOARCH)/cluster-version-operator /tmp/build/cluster-version-operator; \
7-
cp _output/linux/$(go env GOARCH)/cluster-version-operator-tests.gz /tmp/build/cluster-version-operator-tests.gz
6+
cp _output/linux/$(go env GOARCH)/cluster-version-operator _output/linux/$(go env GOARCH)/cluster-version-operator-tests.gz /tmp/build/
87

98
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
10-
COPY --from=builder /tmp/build/cluster-version-operator /usr/bin/
11-
COPY --from=builder /tmp/build/cluster-version-operator-tests.gz /usr/bin/
9+
COPY --from=builder /tmp/build/cluster-version-operator /tmp/build/cluster-version-operator-tests.gz /usr/bin/
1210
COPY install /manifests
1311
COPY vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_* /manifests/
1412
COPY vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.crd-manifests/0000_00_cluster-version-operator_* /manifests/

Dockerfile.rhel

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ WORKDIR /go/src/github.com/openshift/cluster-version-operator
33
COPY . .
44
RUN hack/build-go.sh; \
55
mkdir -p /tmp/build; \
6-
cp _output/linux/$(go env GOARCH)/cluster-version-operator /tmp/build/cluster-version-operator; \
7-
cp _output/linux/$(go env GOARCH)/cluster-version-operator-tests.gz /tmp/build/cluster-version-operator-tests.gz
6+
cp _output/linux/$(go env GOARCH)/cluster-version-operator _output/linux/$(go env GOARCH)/cluster-version-operator-tests.gz /tmp/build/
87

98
FROM registry.ci.openshift.org/ocp/4.21:base-rhel9
10-
COPY --from=builder /tmp/build/cluster-version-operator /usr/bin/
11-
COPY --from=builder /tmp/build/cluster-version-operator-tests.gz /usr/bin/
9+
COPY --from=builder /tmp/build/cluster-version-operator /tmp/build/cluster-version-operator-tests.gz /usr/bin/
1210
COPY install /manifests
1311
COPY vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_* /manifests/
1412
COPY vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.crd-manifests/0000_00_cluster-version-operator_* /manifests/

0 commit comments

Comments
 (0)