Skip to content

Commit c7e15c3

Browse files
committedApr 25, 2020
(fix) Use opm builder image for opm indexes
Revert the upstream-builder changes since they break compatibility with a number of workflows. Instead, just point the dockerfile generator to new opm-builder image for upstream. Additionally, update existing docs and dockerfile examples to point to /bin instead of /build/bin for registry examples
1 parent e79673d commit c7e15c3

6 files changed

+13
-16
lines changed
 

‎configmap-registry.Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ FROM quay.io/operator-framework/upstream-registry-builder:latest as builder
22
FROM busybox as userspace
33

44
FROM scratch
5-
COPY --from=builder /build/bin/configmap-server /bin/configmap-server
6-
COPY --from=builder /build/bin/opm /bin/opm
5+
COPY --from=builder /bin/configmap-server /bin/configmap-server
6+
COPY --from=builder /bin/opm /bin/opm
77
COPY --from=userspace /bin/cp /bin/cp
88
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
99
EXPOSE 50051

‎docs/design/opm-tooling.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ FROM quay.io/operator-framework/upstream-registry-builder AS builder
6666
FROM scratch
6767
LABEL operators.operatorframework.io.index.database.v1=./index.db
6868
COPY database ./
69-
COPY --from=builder /build/bin/opm /opm
69+
COPY --from=builder /bin/opm /opm
7070
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
7171
EXPOSE 50051
7272
ENTRYPOINT ["/opm"]

‎opm-example.Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM quay.io/operator-framework/upstream-registry-builder AS builder
1+
FROM quay.io/operator-framework/upstream-opm-builder AS builder
22

33
FROM scratch
44
LABEL operators.operatorframework.io.index.database.v1=./index.db
55
COPY database ./
6-
COPY --from=builder /build/bin/opm /opm
6+
COPY --from=builder /bin/opm /opm
77
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
88
EXPOSE 50051
99
ENTRYPOINT ["/opm"]

‎pkg/containertools/dockerfilegenerator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
const (
11-
defaultBinarySourceImage = "quay.io/operator-framework/upstream-registry-builder"
11+
defaultBinarySourceImage = "quay.io/operator-framework/upstream-opm-builder"
1212
DefaultDbLocation = "/database/index.db"
1313
DbLocationLabel = "operators.operatorframework.io.index.database.v1"
1414
)

‎pkg/containertools/dockerfilegenerator_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func TestGenerateDockerfile_EmptyBaseImage(t *testing.T) {
3939
defer controller.Finish()
4040

4141
databasePath := "database/index.db"
42-
expectedDockerfile := `FROM quay.io/operator-framework/upstream-registry-builder
42+
expectedDockerfile := `FROM quay.io/operator-framework/upstream-opm-builder
4343
LABEL operators.operatorframework.io.index.database.v1=/database/index.db
4444
ADD database/index.db /database/index.db
4545
EXPOSE 50051

‎upstream-builder.Dockerfile

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.13-alpine AS builder
1+
FROM golang:1.13-alpine
22

33
RUN apk update && apk add sqlite build-base git mercurial bash
44
WORKDIR /build
@@ -12,11 +12,8 @@ RUN make static
1212
RUN GRPC_HEALTH_PROBE_VERSION=v0.2.1 && \
1313
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-$(go env GOARCH) && \
1414
chmod +x /bin/grpc_health_probe
15-
16-
FROM scratch
17-
COPY --from=builder /build/bin/opm /bin/opm
18-
COPY --from=builder /build/bin/initializer /bin/initializer
19-
COPY --from=builder /build/bin/appregistry-server /bin/appregistry-server
20-
COPY --from=builder /build/bin/configmap-server /bin/configmap-server
21-
COPY --from=builder /build/bin/registry-server /bin/registry-server
22-
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
15+
RUN cp /build/bin/opm /bin/opm && \
16+
cp /build/bin/initializer /bin/initializer && \
17+
cp /build/bin/appregistry-server /bin/appregistry-server && \
18+
cp /build/bin/configmap-server /bin/configmap-server && \
19+
cp /build/bin/registry-server /bin/registry-server

0 commit comments

Comments
 (0)