{"id":20777,"date":"2026-08-12T17:41:59","date_gmt":"2026-08-12T09:41:59","guid":{"rendered":"https:\/\/blog.ywdevops.cn\/?p=20777"},"modified":"2026-08-12T18:17:14","modified_gmt":"2026-08-12T10:17:14","slug":"nexus3","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2026\/08\/12\/nexus3\/","title":{"rendered":"nexus3\u90e8\u7f72"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u672c\u4f8b\u5b50\u4f7f\u7528docker-compose\u65b9\u5f0f\u6765\u8fd0\u884c<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u73af\u5883\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>docker\u955c\u50cf<\/td><td>\u64cd\u4f5c\u7cfb\u7edf<\/td><\/tr><tr><td>sonatype\/nexus3:3.88.0<\/td><td>ubuntu24.04<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001docker-compose.yml\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>services:\n  nexus3:\n    image: 192.168.51.228:5000\/nexus3:3.88.0\n    container_name: nexus3\n    restart: always\n    ports:\n      - \"8082:8081\"   #\u5916\u5c42\u7aef\u53e3\u81ea\u5b9a\u4e49\uff0c\u6211\u8fd9\u91cc\u51998082\n    volumes:\n      - .\/data:\/nexus-data\n    environment:\n      - INSTALL4J_ADD_VM_PARAMS=-Xms512m -Xmx1536m -XX:MaxDirectMemorySize=512m -Djava.util.prefs.userRoot=\/nexus-data\/javaprefs<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001docker-compose.yml\u540c\u7ea7\u76ee\u5f55\u4e0b\u521b\u5efadata\u76ee\u5f55\uff0c\u8d4b\u4e88\u6743\u9650\uff0c\u542f\u52a8\u5bb9\u5668<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir data\nchmod 777 data\ndocker-compose up -d<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001\u83b7\u53d6\u521d\u59cb\u767b\u5f55\u5bc6\u7801\uff0c\u767b\u5f55\u540e\u9700\u8981\u4fee\u6539\u7684<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker exec nexus3 cat \/nexus-data\/admin.password<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">4\u3001\u901a\u8fc7ip:8082\u767b\u5f55\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"645\" height=\"407\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/08\/4.png\" alt=\"\" class=\"wp-image-20783\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/08\/4.png 645w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/08\/4-300x189.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2026\/08\/4-600x379.png 600w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u4f8b\u5b50\u4f7f\u7528docker-compose\u65b9\u5f0f\u6765\u8fd0\u884c \u73af\u5883\uff1a docker\u955c\u50cf \u64cd\u4f5c\u7cfb\u7edf sonatype\/nex [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":20780,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-20777","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/20777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=20777"}],"version-history":[{"count":6,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/20777\/revisions"}],"predecessor-version":[{"id":20785,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/20777\/revisions\/20785"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/20780"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=20777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=20777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=20777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}