Skip to content

fix(dockerfile): user needs enough access to read from the filesystem #24

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

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
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -25,16 +25,24 @@ RUN mkdir -p /go/src/github.com/grpc-ecosystem && \

FROM openshift/origin-base

RUN mkdir /registry
WORKDIR /registry

COPY --from=builder /go/src/github.com/operator-framework/operator-registry/bin/initializer /bin/initializer
COPY --from=builder /go/src/github.com/operator-framework/operator-registry/bin/registry-server /bin/registry-server
COPY --from=builder /go/src/github.com/operator-framework/operator-registry/bin/configmap-server /bin/configmap-server
COPY --from=builder /go/bin/grpc_health_probe /bin/grpc_health_probe

RUN chgrp -R 0 /registry && \
chgrp -R 0 /dev && \
chmod -R g+rwx /registry && \
chmod -R g+rwx /dev

# This image doesn't need to run as root user
USER 1001

EXPOSE 50051

LABEL io.k8s.display-name="OpenShift Operator Registry" \
io.k8s.description="This is a component of OpenShift Operator Lifecycle Manager and is the base for operator catalog API containers." \
maintainer="Odin Team <[email protected]>"
io.k8s.description="This is a component of OpenShift Operator Lifecycle Manager and is the base for operator catalog API containers." \
maintainer="Odin Team <[email protected]>"