Skip to content

Conversation

@namloc2001
Copy link

Make container run as nonroot and ensure compatibility with K8s PSPs and OpenShift restricted SCC.

removed:

ENV NEXUS_DATA_CHOWN "false"
...
...
# Copy runnable script
COPY run /etc/service/nexus/run
...
...
CMD ["/sbin/runsvdir", "-P", "/etc/service"]

Because this is all now achieved within the container image configuration. The default user for running the container image nexus and there the command to be used can now be /opt/sonatype/nexus/bin/nexus run.

(Move details on OpenShift compatibility can be found here: https://developers.redhat.com/blog/2020/10/26/adapting-docker-and-kubernetes-containers-to-run-on-red-hat-openshift-container-platform#)

Make container run as nonroot and ensure compatibility with K8s PSPs and OpenShift restricted SCC.

removed:
```
ENV NEXUS_DATA_CHOWN "false"
...
...
# Copy runnable script
COPY run /etc/service/nexus/run
...
...
CMD ["/sbin/runsvdir", "-P", "/etc/service"]
```

Because this is all now achieved within the container image configuration. The default user for running the container image `nexus` and there the command to be used can now be `/opt/sonatype/nexus/bin/nexus run`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant