{"id":468,"date":"2016-02-23T10:45:32","date_gmt":"2016-02-23T10:45:32","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2016\/02\/23\/sonatype-nexus-installation-using-docker\/"},"modified":"2021-11-19T06:21:44","modified_gmt":"2021-11-19T06:21:44","slug":"sonatype-nexus-installation-using-docker","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/sonatype-nexus-installation-using-docker\/","title":{"rendered":"How to Install Sonatype Nexus installation using Docker?"},"content":{"rendered":"<h3><strong>Sonatype Nexus Repository Manager 2<\/strong><\/h3>\n<p><strong>Install a Docker Engine<\/strong><br>\nInstallation Instructions can be found here &#8211; http:\/\/www.devopsschool.com\/tutorial\/docker\/docker-install-and-configuration.html<\/p>\n<p><strong>Download a Sonatype Nexus Image<\/strong><br>\n&gt; docker pull sonatype\/nexus<\/p>\n<p><strong>For Sonatype Nexus Repository Manager 2 OSS, To run (if port 8081 is open on your host): <\/strong><br>\n&gt; docker run -d -p 8081:8081 &#8211;name nexus sonatype\/nexus:oss<\/p>\n<p><strong>For Sonatype Nexus Repository Manager 2 PRO, To run (if port 8081 is open on your host):<\/strong><br>\n&gt; docker run -d -p 8081:8081 &#8211;name nexus sonatype\/nexus:pro<\/p>\n<p><strong>To determine the port that the container is listening on:<\/strong><br>\n&gt; docker ps -l<\/p>\n<p><strong>To Test<\/strong><br>\n&gt; curl http:\/\/localhost:8081\/nexus\/service\/local\/status<\/p>\n<p><strong>Browse Following URL<\/strong><br>\nhttp:\/\/localhost:8081\/nexus\/<\/p>\n<p><strong>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:<\/strong><br>\n&gt; docker logs -f nexus<\/p>\n<p><strong>Note<\/strong><br>\nDefault credentials are: admin \/ admin123<br>\nInstallation of Nexus is to \/opt\/sonatype\/nexus<br>\nNotably: \/opt\/sonatype\/nexus\/conf\/nexus.properties is the properties file.<br>\nParameters (nexus-work and nexus-webapp-context-path) defined<br>\nhere are overridden in the JVM invocation.<\/p>\n<h3><strong>Sonatype Nexus Repository Manager 3<\/strong><\/h3>\n<p><strong>Install a Docker Engine<\/strong><br>\nInstallation Instructions can be found here &#8211; http:\/\/www.devopsschool.com\/tutorial\/docker\/docker-install-and-configuration.html<\/p>\n<p><strong>Clone the Repostory from Gihub<\/strong><br>\n&gt; git clone https:\/\/github.com\/sonatype\/docker-nexus3<br>\n&gt; cd docker-nexus3<\/p>\n<p><strong>Build a Image for Sonatype Nexus Repository Manager 3 OSS<\/strong><br>\n&gt; docker build &#8211;rm &#8211;tag sonatype\/nexus oss\/<\/p>\n<p><strong>Build a Image for Sonatype Nexus Repository Manager 3 PRO<\/strong><br>\n&gt; docker build &#8211;rm &#8211;tag sonatype\/nexus:pro pro\/<\/p>\n<p><strong>For Sonatype Nexus Repository Manager 2 OSS, To run (if port 8081 is open on your host):<\/strong><br>\n&gt; docker run -d -p 8081:8081 &#8211;name nexus sonatype\/nexus:oss<\/p>\n<p><strong>For Sonatype Nexus Repository Manager 2 PRO, To run (if port 8081 is open on your host):<\/strong><br>\n&gt; docker run -d -p 8081:8081 &#8211;name nexus sonatype\/nexus:pro<\/p>\n<p><strong>To determine the port that the container is listening on:<\/strong><br>\n&gt; docker ps -l<\/p>\n<p><strong>To Test<\/strong><br>\n&gt; curl http:\/\/localhost:8081\/nexus\/service\/local\/status<\/p>\n<p><strong>Browse Following URL<\/strong><br>\nhttp:\/\/localhost:8081\/nexus\/<\/p>\n<p><strong>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:<\/strong><br>\n&gt; docker logs -f nexus<\/p>\n<p><strong>Note<\/strong><br>\nDefault credentials are: admin \/ admin123<br>\nInstallation of Nexus is to \/opt\/sonatype\/nexus<br>\nNotably: \/opt\/sonatype\/nexus\/conf\/nexus.properties is the properties file.<br>\nParameters (nexus-work and nexus-webapp-context-path) defined<br>\nhere are overridden in the JVM invocation.<\/p>\n<p><strong>Reference<\/strong><br>\n<a href=\"https:\/\/hub.docker.com\/r\/sonatype\/nexus\/\" target=\"_blank\" rel=\"noopener\">https:\/\/hub.docker.com\/r\/sonatype\/nexus\/<\/a><\/p>\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_81337\"><figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube epyt-figure\"><div class=\"wp-block-embed__wrapper\"><iframe loading=\"lazy\"  id=\"_ytid_24416\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_81337\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Sonatype Nexus Repository Manager 2 Install a Docker Engine Installation Instructions can be found here &#8211; http:\/\/www.devopsschool.com\/tutorial\/docker\/docker-install-and-configuration.html Download a Sonatype Nexus Image &gt; docker pull sonatype\/nexus For Sonatype Nexus Repository Manager 2 OSS, To run (if port 8081 is open on your host): &gt; docker run -d -p 8081:8081 &#8211;name nexus sonatype\/nexus:oss For Sonatype Nexus&#8230;<\/p>\n","protected":false},"author":1,"featured_media":3156,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[157],"tags":[567,1122,545,237,426,1312,1313,1310,1311,593,570,732,213],"class_list":["post-468","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sonatype-nexus","tag-docker","tag-guide","tag-how","tag-install","tag-nexus","tag-nexus-installation","tag-nexus-installation-tutorial","tag-nexus-installation-using-docker-guide","tag-nexus-installation-using-docker-tutorial","tag-process","tag-sonatype-nexus","tag-steps","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=468"}],"version-history":[{"count":5,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/468\/revisions"}],"predecessor-version":[{"id":25789,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/468\/revisions\/25789"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/3156"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}