Skip to content

Commit 1e0b2ba

Browse files
Merge pull request #2134 from benluddy/cleanup-downstream-cruft
Remove OpenShift-specific Dockerfiles.
2 parents 5bd6354 + 3f29958 commit 1e0b2ba

File tree

4 files changed

+16
-84
lines changed

4 files changed

+16
-84
lines changed

.github/workflows/test-scripts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: docker/build-push-action@v1
1818
with:
1919
repository: operator-framework/olm
20-
dockerfile: ./upstream.Dockerfile
20+
dockerfile: ./Dockerfile
2121
push: false
2222
run-local-minikube:
2323
runs-on: ubuntu-latest

Dockerfile

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,36 @@
1-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.8 AS builder
2-
3-
ENV GO111MODULE auto
4-
ENV GOPATH /go
5-
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
6-
1+
FROM quay.io/fedora/fedora:34-x86_64 as builder
2+
LABEL stage=builder
73
WORKDIR /build
84

5+
# install dependencies and go 1.16
6+
97
# copy just enough of the git repo to parse HEAD, used to record version in OLM binaries
8+
RUN dnf update -y && dnf install -y bash make git mercurial jq wget golang && dnf upgrade -y
109
COPY .git/HEAD .git/HEAD
1110
COPY .git/refs/heads/. .git/refs/heads
1211
RUN mkdir -p .git/objects
13-
1412
COPY Makefile Makefile
1513
COPY OLM_VERSION OLM_VERSION
1614
COPY pkg pkg
1715
COPY vendor vendor
16+
COPY go.mod go.mod
17+
COPY go.sum go.sum
1818
COPY cmd cmd
1919
COPY util util
2020
COPY test test
21-
COPY go.mod go.mod
22-
COPY go.sum go.sum
23-
RUN CGO_ENABLED=1 make build
21+
RUN CGO_ENABLED=0 make build
2422
RUN make build-util
2523

26-
FROM registry.ci.openshift.org/ocp/4.8:base
27-
28-
ADD manifests/ /manifests
29-
LABEL io.openshift.release.operator=true
30-
31-
# Copy the binary to a standard location where it will run.
24+
# use debug tag to keep a shell around for backwards compatibility with the previous alpine image
25+
FROM gcr.io/distroless/static:debug
26+
LABEL stage=olm
27+
WORKDIR /
28+
# bundle unpack Jobs require cp at /bin/cp
29+
RUN ["/busybox/ln", "-s", "/busybox/cp", "/bin/cp"]
3230
COPY --from=builder /build/bin/olm /bin/olm
3331
COPY --from=builder /build/bin/catalog /bin/catalog
3432
COPY --from=builder /build/bin/package-server /bin/package-server
3533
COPY --from=builder /build/bin/cpb /bin/cpb
36-
37-
# This image doesn't need to run as root user.
38-
USER 1001
39-
4034
EXPOSE 8080
4135
EXPOSE 5443
42-
43-
# Apply labels as needed. ART build automation fills in others required for
44-
# shipping, including component NVR (name-version-release) and image name. OSBS
45-
# applies others at build time. So most required labels need not be in the source.
46-
#
47-
# io.k8s.display-name is required and is displayed in certain places in the
48-
# console (someone correct this if that's no longer the case)
49-
#
50-
# io.k8s.description is equivalent to "description" and should be defined per
51-
# image; otherwise the parent image's description is inherited which is
52-
# confusing at best when examining images.
53-
#
54-
LABEL io.k8s.display-name="OpenShift Operator Lifecycle Manager" \
55-
io.k8s.description="This is a component of OpenShift Container Platform and manages the lifecycle of operators." \
56-
maintainer="Odin Team <[email protected]>"
36+
CMD ["/bin/olm"]

base.Dockerfile

Lines changed: 0 additions & 12 deletions
This file was deleted.

upstream.Dockerfile

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)