Docke搭建Maven私服

lemon发布

查找nexus3镜像

docker search nexus3

拉取nexus3镜像

docker pull docker.io/sonatype/nexus3

查看镜像

docker images

运行nexus容器

docker run -id --privileged=true --name=nexus3 --restart=always -p 8081:8081 -v /data/nexus3/nexus-data:/var/nexus-data 8eb898be2a53(这个是容器id或名称)

解释:
-id 创建守护式容器
–privileged=true 授予root权限(挂载多级目录必须为true,否则容器访问宿主机权限不足)
–name=名字 给你的容器起个名字
-p 宿主机端口:容器端口映射
-v 宿主机目录:容器目录 目录挂载

查询容器信息

docker inspect nexus

查看密码

#查询容器id
docker ps
 
#进入容器里面
docker exec -it 容器id bash
# 查看密码
vi admin.password
分类: Windows

4 条评论

online · 2021年2月7日 上午7:09

It as hard to find expert persons by this matter, then again you sound like you already make out what you are talking about! Thanks Sydelle Arther Juna

watch · 2021年2月7日 上午7:09

As I website possessor I believe the content matter here is rattling great , appreciate it for your hard work. You should keep it up forever! Best of luck. Trudi Mitchell Aalst

movie download · 2021年2月7日 上午8:38

Just want to say your article is as astonishing. The clearness in your post is simply spectacular and i can assume you are an expert on this subject. Well with your permission allow me to grab your RSS feed to keep updated with forthcoming post. Thanks a million and please continue the gratifying work. Natalee Sayres Yance

netflix · 2021年2月7日 上午8:38

You have made some really good points there. I checked on the net to learn more about the issue and found most individuals will go along with your views on this web site. Starlene Izaak Halfdan

发表回复

Avatar placeholder

您的邮箱地址不会被公开。 必填项已用 * 标注