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

Update Dockerfile #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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