Skip to content

Latest commit

 

History

History
executable file
·
80 lines (52 loc) · 5.59 KB

README.md

File metadata and controls

executable file
·
80 lines (52 loc) · 5.59 KB

Sonatype Platform on Docker

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.

What is the Sonatype Platform?

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:

  1. Sonatype Nexus Repository (either Sonatype Nexus Repository OSS or Sonatype Nexus Repository Pro)
  2. Sonatype Lifecycle and its add-on packs:
  3. Sonatype Repository Firewall
  4. Sonatype SBOM Manager

For the full suite of products - check out www.sonatype.com.

How does this code work?

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

Providing your Sonatype License

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:

  1. Put your .lic file in config/sonatype-license-all.lic
  2. Modify the path to your .lic file in the .env file:
    NEXUS_LICENSE_PATH=/your/path/to/your-sonatype.lic
    

Reference Architecture Profiles

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

Additional Sub Profiles

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!

License

See LICENSE file for details.

The Fine Print

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!