All Projects → sonatype → Docker Nexus3

sonatype / Docker Nexus3

Licence: apache-2.0
Dockerized version of Nexus Repo Manager 3

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to Docker Nexus3

Nexus Public
Sonatype Nexus Repository Manager; Open-source codebase mirror
Stars: ✭ 902 (-1.64%)
Mutual labels:  repository, repository-management
Projj
Manage repository easily.
Stars: ✭ 206 (-77.54%)
Mutual labels:  repository, repository-management
Nexus Oss
Sonatype Nexus OSS
Stars: ✭ 240 (-73.83%)
Mutual labels:  repository, repository-management
Dcrm
Darwin Cydia Repo Manager - v4 redesigned in Django.
Stars: ✭ 188 (-79.5%)
Mutual labels:  repository, repository-management
ferryd
Fast, safe and reliable transit for the delivery of software updates to users.
Stars: ✭ 43 (-95.31%)
Mutual labels:  repository, repository-management
Loopback Next
LoopBack makes it easy to build modern API applications that require complex integrations.
Stars: ✭ 3,972 (+333.15%)
Mutual labels:  repository
Zappr
An agent that enforces guidelines for your GitHub repositories
Stars: ✭ 504 (-45.04%)
Mutual labels:  repository
Arch4edu
Archlinux and ArchlinuxARM Repository for Education
Stars: ✭ 332 (-63.79%)
Mutual labels:  repository
Android Architecture Components Kotlin
Sample used to practice Kotlin and Android Architecture Components.
Stars: ✭ 326 (-64.45%)
Mutual labels:  repository
Gitsuggest
A tool to suggest github repositories based on the repositories you have shown interest in.
Stars: ✭ 636 (-30.64%)
Mutual labels:  repository
Awesome Indonesia Repo
A curated list of amazingly awesome repository created and contributed by Indonesian people.
Stars: ✭ 441 (-51.91%)
Mutual labels:  repository
Centraldogma
Highly-available version-controlled service configuration repository based on Git, ZooKeeper and HTTP/2
Stars: ✭ 378 (-58.78%)
Mutual labels:  repository
Repository
Home Assistant Community Add-ons
Stars: ✭ 520 (-43.29%)
Mutual labels:  repository
Repology Updater
Repology backend service to update repository and package data
Stars: ✭ 348 (-62.05%)
Mutual labels:  repository
Laravel Repositories
[ABANDONED] Rinvex Repository is a simple, intuitive, and smart implementation of Active Repository with extremely flexible & granular caching system for Laravel, used to abstract the data layer, making applications more flexible to maintain.
Stars: ✭ 664 (-27.59%)
Mutual labels:  repository
Android Architecture Components
The template project that uses Android Architecture Components with Repository pattern. The simple app that uses awesome Fuel library instead of Retrofit for perfoming HTTP request. The app also persists data using the Room library and display data in RecyclerView.
Stars: ✭ 329 (-64.12%)
Mutual labels:  repository
Microorm.dapper.repositories
CRUD for Dapper
Stars: ✭ 424 (-53.76%)
Mutual labels:  repository
Dspace
(Official) The DSpace digital asset management system that powers your Institutional Repository
Stars: ✭ 548 (-40.24%)
Mutual labels:  repository
Yona
Project Hosting SW, DEMO:
Stars: ✭ 418 (-54.42%)
Mutual labels:  repository
Archstrike
An Arch Linux repository for security professionals and enthusiasts. Done the Arch Way and optimized for i686, x86_64, ARMv6, ARMv7 and ARMv8.
Stars: ✭ 401 (-56.27%)
Mutual labels:  repository

Sonatype Nexus3 Docker: sonatype/nexus3

Join the chat at https://gitter.im/sonatype/nexus-developers

A Dockerfile for Sonatype Nexus Repository Manager 3, starting with 3.18 the image is based on the Red Hat Universal Base Image while earlier versions used CentOS.

Contribution Guidelines

Go read our contribution guidelines to get a bit more familiar with how we would like things to flow.

Running

To run, binding the exposed port 8081 to the host, use:

$ docker run -d -p 8081:8081 --name nexus sonatype/nexus3

When stopping, be sure to allow sufficient time for the databases to fully shut down.

docker stop --time=120 <CONTAINER_NAME>

To test:

$ curl http://localhost:8081/

Building the Nexus Repository Manager image

To build a docker image from the Docker file you can use this command:

$ docker build --rm=true --tag=sonatype/nexus3 .

The following optional variables can be used when building the image:

  • NEXUS_VERSION: Version of the Nexus Repository Manager
  • NEXUS_DOWNLOAD_URL: Download URL for Nexus Repository, alternative to using NEXUS_VERSION to download from Sonatype
  • NEXUS_DOWNLOAD_SHA256_HASH: Sha256 checksum for the downloaded Nexus Repository Manager archive. Required if NEXUS_VERSION or NEXUS_DOWNLOAD_URL is provided

Chef Solo for Runtime and Application

Chef Solo is used to build out the runtime and application layers of the Docker image. The Chef cookbook being used is available on GitHub at sonatype/chef-nexus-repository-manager.

Testing the Dockerfile

We are using rspec as the test framework. serverspec provides a docker backend (see the method set in the test code) to run the tests inside the docker container, and abstracts away the difference between distributions in the tests (e.g. yum, apt,...).

rspec [--backtrace] spec/Dockerfile_spec.rb

Red Hat Certified Image

A Red Hat certified container image can be created using Dockerfile.rh.ubi which is built to be compliant with Red Hat certification. The image includes additional meta data to comform with Kubernetes and OpenShift standards, a directory with the licenses applicable to the software and a man file for help on how to use the software. It also uses an ENTRYPOINT script the ensure the running user has access to the appropriate permissions for OpenShift 'restricted' SCC.

The Red Hat certified container image is available from the Red Hat Container Catalog and qualified accounts can pull it from registry.connect.redhat.com.

Other Red Hat Images

In addition to the Universal Base Image, we can build images based on:

  • Red Hat Enterprise Linux: Dockerfile.rh.el
  • CentOS: Dockerfile.rh.centos

Notes

  • Our system requirements should be taken into account when provisioning the Docker container.

  • Default user is admin and the uniquely generated password can be found in the admin.password file inside the volume. See Persistent Data for information about the volume.

  • It can take some time (2-3 minutes) for the service to launch in a new container. You can tail the log to determine once Nexus is ready:

$ docker logs -f nexus
  • Installation of Nexus is to /opt/sonatype/nexus.

  • A persistent directory, /nexus-data, is used for configuration, logs, and storage. This directory needs to be writable by the Nexus process, which runs as UID 200.

  • There is an environment variable that is being used to pass JVM arguments to the startup script

    • INSTALL4J_ADD_VM_PARAMS, passed to the Install4J startup script. Defaults to -Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs.

    This can be adjusted at runtime:

    $ docker run -d -p 8081:8081 --name nexus -e INSTALL4J_ADD_VM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=/some-other-dir" sonatype/nexus3
    

    Of particular note, -Djava.util.prefs.userRoot=/some-other-dir can be set to a persistent path, which will maintain the installed Nexus Repository License if the container is restarted.

    Be sure to check the memory requirements when deciding how much heap and direct memory to allocate.

  • Another environment variable can be used to control the Nexus Context Path

    • NEXUS_CONTEXT, defaults to /

    This can be supplied at runtime:

    $ docker run -d -p 8081:8081 --name nexus -e NEXUS_CONTEXT=nexus sonatype/nexus3
    

Persistent Data

There are two general approaches to handling persistent storage requirements with Docker. See Managing Data in Containers for additional information.

  1. Use a docker volume. Since docker volumes are persistent, a volume can be created specifically for this purpose. This is the recommended approach.
$ docker volume create --name nexus-data
$ docker run -d -p 8081:8081 --name nexus -v nexus-data:/nexus-data sonatype/nexus3
  1. Mount a host directory as the volume. This is not portable, as it relies on the directory existing with correct permissions on the host. However it can be useful in certain situations where this volume needs to be assigned to certain specific underlying storage.
$ mkdir /some/dir/nexus-data && chown -R 200 /some/dir/nexus-data
$ docker run -d -p 8081:8081 --name nexus -v /some/dir/nexus-data:/nexus-data sonatype/nexus3

Getting Help

Looking to contribute to our Docker image but need some help? There's a few ways to get information or our attention:

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].