Sign inSign up

pierrelouistalbot/nexus

By pierrelouistalbot

Updated 4 months ago

Deprecated: upstream sonatype/nexus3 is now multi-arch - use it instead

Image
Integration & delivery
Databases & storage
0

3.9K

pierrelouistalbot/nexus repository overview

Nexus

⚠️ This image is no longer built or maintained

Why this repository existed: the upstream sonatype/nexus3 image was published for amd64 only, while part of the homelab runs on arm64. This repository built the missing multi-architecture image.

Why it stopped: upstream now ships both — sonatype/nexus3:3.95.3 publishes linux/amd64 and linux/arm64 — so there is nothing left for this image to add. The project is archived and its CI no longer runs. The last image it published is 3.70.5, built from the last Nexus release that still supported OrientDB, before the datastore migrator.

What to use instead: the upstream image docker.io/sonatype/nexus3. The homelab deployment moved to it and now runs 3.95.3, pulled straight from Docker Hub by the nexus kustomize base — no image from this repository is involved any more.

Existing tags stay published. The tags listed below remain on Docker Hub under pierrelouistalbot/nexus and are not being deleted, so anything still pinned to one of them keeps working. Nothing new will be added, including security fixes: pin the upstream image instead.

The sections below describe how the image was built and used, and are kept for reference only.

Nexus docker image for AMD & ARM based processors.
Based on Alpine OpenJDK 8.
Official Website of Sonatype Nexus.

Quick reference

How to use this image

Start a nexus instance locally
docker volume create nexus-data

docker run --detach --name nexus -p 8081 -v nexus-data:/opt/sonatype/sonatype-work/nexus3/ pierrelouistalbot/nexus:latest

Once the container has started, wait a few minutes for the instance to initialize. Once it's done, run the following command to get the default admin password:

docker exec -it nexus cat /opt/sonatype/sonatype-work/nexus3/admin.password
Environment variables

There is no environment variable for now.

Volumes
  • /opt/sonatype/sonatype-work/nexus3/ contains all the nexus data.
Configuration

The configuration is stored in the /opt/sonatype/sonatype-work/nexus3/etc/nexus.properties file.

Image building

Health/Liveness/Readiness Checking

See the "Official Images" FAQ for why there is no default HEALTHCHECK directive. However, you can set it up this way:

HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
  CMD curl -f http://localhost:8081/service/metrics/healthcheck/ || exit 1
Build locally

Run the following command to build and the image only for testing purposes

VERSION=3.63.0
SUFFIX=01

docker build --build-arg NEXUS_VERSION=${VERSION} --build-arg NEXUS_SUFFIX=${SUFFIX} --tag mynexus:latest .
docker run -p 8081 -it mynexus:latest

To build the image for production ready for processors architectures AMD and ARM, you first need to install builx. buildx is a Docker CLI plugin for extended build capabilities with BuildKit.

  1. Install the buildx plugin following the documentation

  2. Setup a new builder instance and use it

docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx inspect --bootstrap
  1. Build the image for all supported architectures
# Set the version
VERSION=3.63.0
SUFFIX=01

# For each platform build and push the image
docker buildx build --platform linux/amd64,linux/arm64 --build-arg NEXUS_VERSION=${VERSION} --build-arg NEXUS_SUFFIX=${SUFFIX} --tag nexus:$VERSION --load .

Notes

  • It is possible to run the image as root but it's not a good practice. The container will run as the entrypoint.sh script needs to run as root to change the owner of the /opt/sonatype/sonatype-work/nexus3 directory.

  • Pushing directly to registry using docker buildx build --push is not possible because I only get a 413 error. I have to export the image locally and then push it to the registry.

License Disclaimer

Nexus Repository OSS is distributed with Sencha Ext JS pursuant to a FLOSS Exception agreed upon between Sonatype, Inc. and Sencha Inc. Sencha Ext JS is licensed under GPL v3 and cannot be redistributed as part of a closed source work.

Tag summary

Content type

Image

Digest

sha256:11f6bff2b

Size

533.1 MB

Last updated

4 months ago

docker pull pierrelouistalbot/nexus