{"id":15069504,"url":"https://github.com/stefanprodan/nexus","last_synced_at":"2025-10-05T06:31:24.033Z","repository":{"id":72481791,"uuid":"68612880","full_name":"stefanprodan/nexus","owner":"stefanprodan","description":"A Sonatype Nexus Repository Manager Docker image based on Alpine with OpenJDK 8","archived":true,"fork":false,"pushed_at":"2017-04-24T12:27:56.000Z","size":16,"stargazers_count":16,"open_issues_count":2,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-30T13:05:28.413Z","etag":null,"topics":["docker","nexus","openjdk"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/stefanprodan/nexus/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanprodan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-19T14:16:51.000Z","updated_at":"2023-01-28T14:44:53.000Z","dependencies_parsed_at":"2023-03-09T03:31:09.868Z","dependency_job_id":null,"html_url":"https://github.com/stefanprodan/nexus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanprodan%2Fnexus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanprodan%2Fnexus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanprodan%2Fnexus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanprodan%2Fnexus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanprodan","download_url":"https://codeload.github.com/stefanprodan/nexus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235370461,"owners_count":18979093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","nexus","openjdk"],"created_at":"2024-09-25T01:42:54.377Z","updated_at":"2025-10-05T06:31:18.747Z","avatar_url":"https://github.com/stefanprodan.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nexus Repository Manager OSS\n\n[![](https://images.microbadger.com/badges/image/stefanprodan/nexus.svg)](https://microbadger.com/images/stefanprodan/nexus \"Get your own image badge on microbadger.com\")\n\nA Sonatype Nexus Repository Manager image based on Alpine with OpenJDK 8.\n\nRunning Nexus with:\n* Repository on port 8081\n* Docker Registry (hosted) on port 5000\n* Data persistence on a host directory\n\n```\ndocker run -d --name nexus \\\n    -v /path/to/nexus-data:/nexus-data \\\n\t-p 8081:8081 \\\n\t-p 5000:5000 \\\n\tstefanprodan/nexus\n```\n\n## Notes\n\n* Default credentials are: `admin` / `admin123`\n\n* It can take some time for the service to launch in a new container. You can tail the log to determine once Nexus is ready:\n\n```\n$ docker logs -f nexus\n```\n\n* Test with curl:\n\n```\n$ curl -u admin:admin123 http://localhost:8081/service/metrics/ping\n```\n\n* Installation of Nexus is to `/opt/sonatype/nexus-version`.  \n\n* A persistent directory, `/nexus-data`, is used for configuration, logs, and storage.\n\n* Three environment variables can be used to control the JVM arguments\n\n  * `JAVA_MAX_MEM`, passed as -Xmx.  Defaults to `1200m`.\n\n  * `JAVA_MIN_MEM`, passed as -Xms.  Defaults to `1200m`.\n\n  * `EXTRA_JAVA_OPTS`.  Additional options can be passed to the JVM via this variable.\n\n\n## Configure NGINX as reverse proxy for Nexus and hosted Docker Registry\n\n***nginx.conf***\n\n```\nworker_processes 1;\n\nevents { \n\tworker_connections 1024; \n}\n\nhttp {\n\terror_log /var/log/nginx/error.log warn;\n\taccess_log  /dev/null;\n\tproxy_intercept_errors off;\n\tproxy_send_timeout 120;\n\tproxy_read_timeout 300;\n\t\n\tupstream nexus {\n        server nexus:8081;\n\t}\n\n\tupstream registry {\n        server nexus:5000;\n\t}\n\n\tserver {\n        listen 80;\n        server_name nexus.demo.com;\n\n        keepalive_timeout  5 5;\n        proxy_buffering    off;\n\n        # allow large uploads\n        client_max_body_size 1G;\n\n        location / {\n\t\t# redirect to docker registry\n\t\tif ($http_user_agent ~ docker ) {\n\t\t\tproxy_pass http://registry;\n\t\t}\n\t\tproxy_pass http://nexus;\n\t\tproxy_set_header Host $host;\n\t\tproxy_set_header X-Real-IP $remote_addr;\n\t\tproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\t\tproxy_set_header X-Forwarded-Proto \"https\";\n        }\n    }\n}\n``` \n\nReplace ***nexus.demo.com*** with your own domain. The NGINX server detects if a call is made by the docker client, based on user agent, and redirects that call to the Docker Registry. You alose need to setup a certificate with letsencrypt for Docker Registry to work over SSL.\n\n## Nexus and Nginx setup\n\n```\ndocker network create nexus-net\n\ndocker run -d --name nexus \\\n    -v /path/to/nexus-data:/nexus-data \\\n    --restart unless-stopped \\\n    --network nexus-net \\\n\tstefanprodan/nexus\n\t\ndocker run -d -p 80:80 -p 443:443 --name nginx \\\n    -v $(pwd)/nginx.conf:/etc/nginx/nginx.conf:ro \\\n    --restart unless-stopped \\\n    --network nexus-net \\\n    nginx\n```\n\n## Changelog\n\n* 24 Dec 2016  - Nexus 3.2.0-01\n* 19 Sept 2016 - Nexus 3.0.2-02\n* 25 Feb 2017 - Nexus 3.2.1-01\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanprodan%2Fnexus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanprodan%2Fnexus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanprodan%2Fnexus/lists"}