docker nexus oss

sonatype/docker-nexus

Docker images for Sonatype Nexus with the Oracle JDK.

To build:

# docker build --rm --tag sonatype/nexus oss/
# docker build --rm --tag sonatype/nexus-pro pro/

To run (if port 8081 is open on your host):

# docker run -d -p 8081:8081 --name nexus sonatype/nexus:oss

To determine the port that the container is listening on:

# docker ps nexus

To test:

$ curl http://localhost:8081/service/local/status

To build, copy the Dockerfile and do the build:

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

Notes

  • Default credentials are: admin / admin123
  • 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. Notably:
    /opt/sonatype/nexus/conf/nexus.properties is the properties file.
    Parameters (nexus-work and nexus-webapp-context-path) definied
    here are overridden in the JVM invocation.
  • A persistent directory, /sonatype-work, is used for configuration,
    logs, and storage. This directory needs to be writable by the Nexus
    process, which runs as UID 200.
  • Environment variables can be used to control the JVM arguments
    • CONTEXT_PATH, passed as -Dnexus-webapp-context-path. This is used to define the
      URL which Nexus is accessed.
    • MAX_HEAP, passed as -Xmx. Defaults to 768m.
    • MIN_HEAP, passed as -Xms. Defaults to 256m.
    • JAVA_OPTS. Additional options can be passed to the JVM via this variable.
      Default: -server -XX:MaxPermSize=192m -Djava.net.preferIPv4Stack=true.
    • LAUNCHER_CONF. A list of configuration files supplied to the
      Nexus bootstrap launcher. Default: ./conf/jetty.xml ./conf/jetty-requestlog.xml

    These can be user supplied at runtime to control the JVM:

    $ docker run -d -p 8081:8081 --name nexus -e MAX_HEAP=768m sonatype/nexus
    

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 data volume container. Since data volumes are persistent
    until no containers use them, a container can be created specifically for
    this purpose. This is the recommended approach.

    $ docker run -d --name nexus-data sonatype/nexus echo "data-only container for Nexus"
    $ docker run -d -p 8081:8081 --name nexus --volumes-from nexus-data sonatype/nexus
    
  2. 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 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:/sonatype-work sonatype/nexus
    

Adding Nexus Plugins

Creating a docker image based on sonatype/nexus is the suggested
process: plugins should be expanded to /opt/sonatype/nexus/nexus/WEB-INF/plugin-repository.
See https://github.com/sonatype/docker-nexus/issues/9 for an example
concerning the Nexus P2 plugins.

时间: 2024-10-12 07:59:01

docker nexus oss的相关文章

试用 Nexus OSS 3.0 的docker仓库 (二)

试用 Nexus OSS 3.0 的docker仓库 (一) : http://www.cnblogs.com/wzy5223/p/5410990.html 三. 创建docker私有仓库,docker (hosted) 访问Nexus的主页,https://192.168.31.135:8443 创建docker (proxy)仓库,内容如下面修改: Name: docker_hosted HTTPS: 8889 Enable Docker V1 API: true 勾选下面的复选框 Blob

docker --Nexus仓库

Nexus 简介 Nexus 是个仓库管理器,目前主要分2大版本:2.X 和 3.X.2.X 主要支持的格式是Maven.P2.OBR.Yum.3.X主要支持的是Docker.NuGet.npm.Bower.Pypi.Ruby Gems,当然也支持构建工具Maven 和Gradle.Nexus 3只支持Oracle jdk8,不支持其它版本的JDK,比如OpenJDK.更多内容可以查看Nexus下载页面. Nexus 安装 本次安装的Nexus OSS的版本是3.1.0.Nexus3 Docke

Nexus Repository Manager OSS 代理p2源

用maven管理构建Eclipse RCP项目时,可能会用到p2源: http://download.eclipse.org/releases/mars/ 内网用户肯定希望能通过nexus服务器代理,就像其它maven源一样. 这个可以通过给nexus安装p2插件实现 : “nexus-p2-repository-plugin”  和 “nexus-p2-bridge-plugin” Nexus 专业版默认是有这两个插件的,Nexus OSS版本需要手动下载. -----------------

阿里云OSS获Docker官方支持 近百万开发者因此受益

  近年来,开源的容器应用引擎Docker在企业IT市场中风生水起,短短两年内,建立在Docker容器软件内的应用被下载5.35亿次.全球约有400万人在使用Docker,约有150,000个在线应用靠Docker容器运行,大型企业正在空前快速地测试或计划采用Docker,胜过其他任何开源的云端产品. 8月12日,Docker1.8和Docker Registry 2.1发布,新版本中加入了Docker Registry对阿里云开放存储服务的正式支持,阿里云成为被Docker官方支持的存储服务的

Docker 环境下搭建nexus私服

一.安装docker 1.脚本安装 本机环境CentOS7,用户为root 下载脚本到工作目录 curl -fsSL https://get.docker.com -o get-docker.sh 执行脚本 sudo sh get-docker.sh 执行完会自动退出shell,需要重新登录. 二.安装docker-compose(可选) 1.脚本安装 安装docker-compose的可执行命令到/usr/local/bin sudo curl -L "https://github.com/d

使用Docker Compose 部署Nexus后初次登录账号密码不正确,并且在nexus-data下没有admin,password

场景 Ubuntu Server 上使用Docker Compose 部署Nexus(图文教程): https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/101111611 在上面已经实现部署Nexus后,初次登录的默认账户密码: admin admin123 但是在进行登录时却提示 密码不正确后者没权限,根据提示密码文件的位置在nexus-data/admin.password下. 因为上面在docker-compose.yml文件

使用Docker Compose 部署Nexus后提示:Unable to create directory /nexus-data/instance

场景 Ubuntu Server 上使用Docker Compose 部署Nexus(图文教程): https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/101111611 在上面部署好Nexus后,启动后日志提示: Unable to create directory /nexus-data/instance 注: 博客:https://blog.csdn.net/badao_liumang_qizhi关注公众号霸道的程序猿获取编程

Maven 私有库 Nexus的安装

1.下载 Nexus下载地址:http://www.sonatype.org/nexus/go/ # wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar.gz 2.解压 #mkdir /usr/nexus # tar -zxvf nexus-2.11.2-03-bundle.tar.gz  -C /usr/nexus/ #cd  /usr/nexus # lsnexus

nexus 从Window迁移至Linux

根据业务需求,需要将nexus-2.8.0从Windows 2003迁移至CentOS 6.8(x86_64)上.在迁移过程中遇见了几个坑,在此记录已做备忘. 因为,nexus是跨平台通用的,所以,我首先在原来的Windows服务器上把nexus打包备份,打包时有两个文件需要打包一个是:nexus-2.8.0-05应用包,另外一个是:sonatype-work文件包.当然这两个包有可能在一个目录下面,但我们之前搭建这个平台的同事是开发,所以......... 在打sonatype-work文件包