Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1827906: (fix) Use opm builder image for opm indexes #299

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
(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
kevinrizza committed Apr 25, 2020
commit c7e15c3c7ce72470c0d87d32f8223a82f7d8ab2a
4 changes: 2 additions & 2 deletions configmap-registry.Dockerfile
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@ FROM quay.io/operator-framework/upstream-registry-builder:latest as builder
FROM busybox as userspace

FROM scratch
COPY --from=builder /build/bin/configmap-server /bin/configmap-server
COPY --from=builder /build/bin/opm /bin/opm
COPY --from=builder /bin/configmap-server /bin/configmap-server
COPY --from=builder /bin/opm /bin/opm
COPY --from=userspace /bin/cp /bin/cp
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
EXPOSE 50051
2 changes: 1 addition & 1 deletion docs/design/opm-tooling.md
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ FROM quay.io/operator-framework/upstream-registry-builder AS builder
FROM scratch
LABEL operators.operatorframework.io.index.database.v1=./index.db
COPY database ./
COPY --from=builder /build/bin/opm /opm
COPY --from=builder /bin/opm /opm
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
EXPOSE 50051
ENTRYPOINT ["/opm"]
4 changes: 2 additions & 2 deletions opm-example.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM quay.io/operator-framework/upstream-registry-builder AS builder
FROM quay.io/operator-framework/upstream-opm-builder AS builder

FROM scratch
LABEL operators.operatorframework.io.index.database.v1=./index.db
COPY database ./
COPY --from=builder /build/bin/opm /opm
COPY --from=builder /bin/opm /opm
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
EXPOSE 50051
ENTRYPOINT ["/opm"]
2 changes: 1 addition & 1 deletion pkg/containertools/dockerfilegenerator.go
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import (
)

const (
defaultBinarySourceImage = "quay.io/operator-framework/upstream-registry-builder"
defaultBinarySourceImage = "quay.io/operator-framework/upstream-opm-builder"
DefaultDbLocation = "/database/index.db"
DbLocationLabel = "operators.operatorframework.io.index.database.v1"
)
2 changes: 1 addition & 1 deletion pkg/containertools/dockerfilegenerator_test.go
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ func TestGenerateDockerfile_EmptyBaseImage(t *testing.T) {
defer controller.Finish()

databasePath := "database/index.db"
expectedDockerfile := `FROM quay.io/operator-framework/upstream-registry-builder
expectedDockerfile := `FROM quay.io/operator-framework/upstream-opm-builder
LABEL operators.operatorframework.io.index.database.v1=/database/index.db
ADD database/index.db /database/index.db
EXPOSE 50051
15 changes: 6 additions & 9 deletions upstream-builder.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13-alpine AS builder
FROM golang:1.13-alpine

RUN apk update && apk add sqlite build-base git mercurial bash
WORKDIR /build
@@ -12,11 +12,8 @@ RUN make static
RUN GRPC_HEALTH_PROBE_VERSION=v0.2.1 && \
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) && \
chmod +x /bin/grpc_health_probe

FROM scratch
COPY --from=builder /build/bin/opm /bin/opm
COPY --from=builder /build/bin/initializer /bin/initializer
COPY --from=builder /build/bin/appregistry-server /bin/appregistry-server
COPY --from=builder /build/bin/configmap-server /bin/configmap-server
COPY --from=builder /build/bin/registry-server /bin/registry-server
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
RUN cp /build/bin/opm /bin/opm && \
cp /build/bin/initializer /bin/initializer && \
cp /build/bin/appregistry-server /bin/appregistry-server && \
cp /build/bin/configmap-server /bin/configmap-server && \
cp /build/bin/registry-server /bin/registry-server