This repo contains docker-compose
files associated sample configuration for quickly standing up a number of Reference Architectures for the Sonatype Platform components.
Ideal if you want to get hands on quickly :-)
Unless you have a license from Sonatype, you will only be able to use Sonatype Nexus Repository OSS.
If you don't have a trial license and would like one contact Sonatype.
When we refer to the Sonatype Platform, we actually refer to three of Sonatype's core-products and their associated add-on packs. These are:
- Sonatype Nexus Repository (either Sonatype Nexus Repository OSS or Sonatype Nexus Repository Pro)
- Sonatype Lifecycle and its add-on packs:
- Sonatype Repository Firewall
- Sonatype SBOM Manager
For the full suite of products - check out www.sonatype.com.
We utilise docker-compose profiles to allow you to quickly stand up the required containers to realise a specific reference architecture, customized with local .env
configuration.
Assuming you have Docker Desktop 19.03.0+ (or similar) installed, you can simply copy default .env-example
to .env
and run docker-compose
passing the required profile. An example using the proxied
profile might be:
cat .env-example | sed -e "s/ORGANIZATION=sonatype/ORGANIZATION=sonatype$([ $(uname -p) = "arm" ] && echo "community")/" -e "s/^UID=.*$/UID=$UID/g" -e "s/^GID=.*$/GID=$GID/g" > .env
docker-compose --profile=proxied up -d
then open http://nexus-platform.localhost
For most of the reference architectures, you'll need a Sonatype license. If you have this (it's a .lic
file), you can use it through one of two methods:
- Put your
.lic
file inconfig/sonatype-license-all.lic
- Modify the path to your
.lic
file in the.env
file:NEXUS_LICENSE_PATH=/your/path/to/your-sonatype.lic
Profile Name | License Required | Sonatype Platform | Nexus Repo | Sonatype Lifecycle | Description |
---|---|---|---|---|---|
proxied |
Yes | Yes - here | Yes here | Yes here | Both Nexus Repository Pro and Sonatype Lifecycle available behind an NGINX reverse proxy. |
direct |
Yes | No | Yes - here | Yes - here | Both Nexus Repository Pro and Sonatype Lifecycle available directly via localhost addressed over HTTP. |
repoOssDemo |
No | No | Yes - here | No | Nexus Repo OSS will be started. |
cicd-jenkins |
Yes | Yes - here | Yes here | Yes here | Includes a Jenkins here |
jenkins-direct |
No | No | No | No | Just Jenkins running here |
The following profiles can be stood up in parallel to the proxied
profile to provide further services:
Profile Name | Endpoints | Description |
---|---|---|
swagger |
Swagger Editor, Swagger UI | Swagger Editor and Swagger UI |
You can run multiple profiles together!
See LICENSE
file for details.
It is worth noting that this is NOT SUPPORTED by Sonatype, and is a contribution of ours to the open source community (read: you!)
Remember:
- Use this contribution at the risk tolerance that you have
- Do NOT file Sonatype support tickets related to this project
- DO file issues here on GitHub, so that the community can pitch in
- Phew, that was easier than I thought. Last but not least of all:
Have fun creating and using this utility to quickly get hands-on with Sonatype Nexus Repository and Sonatype Lifecycle. We are glad to have you here!