Sign inSign up

enieuw/nexus3-oss

By enieuw

•Updated almost 10 years ago

nexus3-oss

Image
0

1.4K

enieuw/nexus3-oss repository overview

⁠Nexus 3

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.

⁠Usage

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

⁠Kubernetes sample

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"
⁠Mandatory environment arguments
  • USERNAME - Nexus user
  • PASSWORD - Nexus password
⁠Nexus script

You are required to make the script available to the container, either via a volume mount or by extending this container

Tag summary

Content type

Image

Digest

Size

207.3 MB

Last updated

almost 10 years ago

docker pull enieuw/nexus3-oss