简体   繁体   English

Sonatype Nexus3 docker image - 如何设置内部docker存储库

[英]Sonatype Nexus3 docker image - How to setup an internal docker repository

Anyone had any experience setting this up? 任何人有任何经验设置这个? Https needs to be enabled in the sonatype/nexus3 config but the files are read only. 需要在sonatype / nexus3配置中启用Https,但文件是只读的。 How can this be edited without having to do a docker build using the nexus3 image? 如何在不使用nexus3映像进行docker构建的情况下进行编辑? Can i login as root inside the container? 我可以在容器内以root用户身份登录吗?

One of our internal people here at Sonatype created a Docker image that helps with this: Sonatype的一位内部人员创建了一个Docker镜像,有助于实现以下目的:

https://hub.docker.com/r/bradbeck/nexus-https/~/dockerfile/ https://hub.docker.com/r/bradbeck/nexus-https/~/dockerfile/

This might help grease the skids for you. 这可能有助于为您提供润滑剂。 Of note this is not supported by Sonatype, but by Brad himself. 值得注意的是,Sonatype并不支持这一点,而是布拉德本人。 Using this Dockerfile as your base would be good, as it will likely be fairly close to our supported one. 使用这个Dockerfile作为你的基础会很好,因为它可能会非常接近我们支持的。

You'd likely modify this to expose a few more ports for the Docker registries you want to create. 您可能会对此进行修改,以便为要创建的Docker注册表公开更多端口。 Thoughts are an internal hosted registry, a proxy of the hub, and then a group of the two for ease of access. 思想是一个内部托管注册表,一个集线器的代理,然后是一组两者,以方便访问。

Run through most of the work here as well: https://books.sonatype.com/nexus-book/reference3/docker.html 在这里完成大部分工作: https//books.sonatype.com/nexus-book/reference3/docker.html

$ docker run -d -p 8081:8081 Have you mapped the port with host and docker container. $ docker run -d -p 8081:8081您是否已使用host和docker容器映射端口。

You can login in container as 您可以登录容器

           ```docker exec -it $container_id /bin/bash```

You can try to use my solution , which actually doesn't modify sonatype/nexus3 original image, but instead use nginx-proxy (with ssl support) in front of nexus3 itself. 您可以尝试使用我的解决方案 ,它实际上不会修改sonatype / nexus3原始图像,而是在nexus3本身前使用nginx-proxy(支持ssl)。 In short it uses docker-compose to make nexus3+nginx work out of the box with one click. 简而言之, 只需单击一下,就可以使用docker -compose使nexus3 + nginx开箱即用。 And at the same time I also have some API calls to make configuration changes during nexus3 deployment, you can extend them with your custom ones. 同时我还有一些API调用来在nexus3部署期间进行配置更改,您可以使用自定义API扩展它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM