This is a quick guide on creating using the NXRM S3 blob store with Minio's S3 implementation. Disclaimer: Using Minio with NXRM is not officially supported by Sonatype.
Follow the quick start guide here: https://github.com/minio/minio. For my testing, I started minio with docker with
docker pull minio/minio
docker run -p 9000:9000 -e "MINIO_ACCESS_KEY=mykey" -e "MINIO_SECRET_KEY=mysecret" minio/minio server data
Minio will helpfully print the credentials you need to the console once it has been started. Recent minio docker images don't print out credentials any more. Supply them as environment variables as above.
Obviously you can skip this step if you already have Minio running.
NXRM will create a bucket automatically on AWS S3, but it doesn't work quite right with Minio. Create the bucket in the Minio web console.
Your best bet is the latest version of NXRM. NXRM 3.12 and later support S3 out of the box and is highly recommended. For older versions of NXRM 3, you can install the unbundled version of the plugin from https://github.com/sonatype/nexus-blobstore-s3, but this isn't being actively supported anymore. Use the bundled version and save yourself some headaches!
There are lots of configuration options here, and you have to get them just right for Minio to work.
- Name: Enter a name (e.g. test-blobstore)
- Bucket: Enter the name of the bucket you created in step 2 (e.g. test)
- Access Key ID: Enter the access key id you provided to docker (e.g. "mykey")
- Secret Access Key: Enter the secret access key you provided to docker (e.g. "mysecret")
- Session Token: leave blank
- Assume Role ARN: leave blank
- Region: Choose us-east-1
- Endpoint URL: Enter the Minio API URL (e.g. http://127.0.0.1:9000)
- Expiration Days: Enter -1
- Signature version: Leave as default
Thats it! Hope this helps.
I was faced the same problem with an older version of Nexus Repository Manager (3.27 I believe).
After finding this thread, I upgraded to v3.37.3 and changed the signature version to
S3SignerType
. I already had path-style access enabled.With that change, pushing Docker images to Nexus began to work.
Based on this, I think there's some incompatibility between Nexus, the AWS Java SDK, and Minio where the combination of them can't operate on v4 signatures (which is the default in Nexus), but is at least capable of using a v2 signature.