1、maven私服-------nexus

使用docker部署,下载最新的image

#docker pull  sonatype/nexus3

#cat docker-compose.yml

version: '2'
services:
   nexus:
      image:   sonatype/nexus3
      container_name: nexus3
      networks:
          - nexus3
      ports:
          - 8081:8081
      volumes:
          -  /data/nexus:/nexus/data
networks:
    nexus3:
      driver: bridge

#mkdir /data/nexus

#docker-compose up  -d 

安装好之后默认的用户名/密码是admin/admin123,需要自己修改密码,访问

http://ip:port

默认的maven-central 使用的是https://repo1.maven.org/maven2/ 地址,速度上没有UK 的快,所以修改为http://uk.maven.org/maven2/

maven-nexus

 

 maven-nexus

 

 2、nginx代理

server {
      listen  80;
      client_max_body_size 204800m;
      client_body_timeout 300000000s;
      send_timeout 3000000000s;
      server_name www.nexus.com;
          location / {
            proxy_pass   http://10.1.1.12:8081;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $host;
        }
}

相关文章:

  • 2021-04-24
  • 2021-09-21
  • 2022-01-15
  • 2021-10-27
  • 2021-10-22
  • 2021-10-29
  • 2022-02-07
  • 2022-02-16
猜你喜欢
  • 2022-01-08
  • 2022-12-23
  • 2021-05-29
  • 2021-12-20
  • 2022-12-23
  • 2021-08-18
相关资源
相似解决方案