A Nexus 3 container based on the official Sonatype image. It extends the image by providing a configure.sh script, which allows you to configure Nexus. The script will wait for Nexus to start. See [https://books.sonatype.com/nexus-book/3.0/reference/scripting.html#_writing_scripts] for details on creating such a script.
Run this image as normal to start Nexus, but also pass the credentials via environment variables so that the configure script can exexcute scripts on the Nexus instance.
If using Kubernetes you can use a PostStart hook to trigger the script in the container `docker run -e USERNAME -e PASSWORD -v
Excerpt
...
containers:
- name: nexus
image: ffung/nexus
imagePullPolicy: Always
env:
- name: USERNAME
value: 'admin'
- name: PASSWORD
valueFrom:
secretKeyRef:
name: nexus-pass
key: password
volumeMounts:
- name: nexus-store
mountPath: /nexus-data
- name: nexus-scripts
mountPath: /nexus-scripts
ports:
- containerPort: 8081
name: nexus
protocol: TCP
lifecycle:
postStart:
exec:
command:
- "configure.sh"
- "/nexus-scripts/configure.json"
You are required to make the script available to the container, either via a volume mount or by extending this container
Content type
Image
Digest
Size
207.3 MB
Last updated
almost 10 years ago
docker pull enieuw/nexus3-oss