docker-nexus icon indicating copy to clipboard operation
docker-nexus copied to clipboard

Update Dockerfile

Open namloc2001 opened this issue 3 years ago • 0 comments

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#)

namloc2001 avatar May 27 '21 07:05 namloc2001