How to install Docker on CentOS 7
Centos中安装Docker, 参考:
https://www.linuxtechi.com/install-docker-on-centos-7/
How to install Nexus Repository Manager 3 with Docker:
https://github.com/sonatype/docker-nexus3
https://help.sonatype.com/display/NXRM3/Installation#Installation-InstallingwithDocker
A. docker Pull Command
- docker pull sonatype/nexus3
B. Persistent Data
There are two general approaches to handling persistent storage requirements with Docker. See Managing Data in Containers for additional information.
- Use a data volume. Since data volumes are persistent until no containers use them, a volume can be created specifically for this purpose. This is the recommended approach.
$ docker volume create –name nexus-data
$ docker run -d -p 8081:8081 –name nexus -v nexus-data:/nexus-data sonatype/nexus3
2. To test.
/]# curl -u admin:admin123 http://localhost:8081/service/metrics/ping
pong
说明成功!
Docker容器启动
$ systemctl start docker
$ systemctl enable docker
$ systemctl stop docker
$ systemctl status docker
nexus的启动:
$ docker start nexus
$ docker stop nexus
$ docker stats nexus
$ docker rm nexus(删除image)
查看Docker中image
$ docker ps -a
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/164226.html