docker harbor托管
harbor使用指南
添加非安全信任:
zjr@zjr-Precision-3630-Tower:~/disk/prjs/IDC_BST_toolchain$ cat /etc/docker/daemon.json { "runtimes": { "nvidia": { "path": "nvidia-container-runtime", "runtimeArgs": [] } }, "insecure-registries":[ "10.249.2.44" ], "registry-mirrors":["https://docker.mirrors.ustc.edu.cn/"] }
重启docker服务:sudo docker service restart
- 登陆: sudo docker login 10.249.2.44
- 拉取idc镜像:sudo docker pull 10.249.2.44/idc/idc_docker:[tag]
- docker后台运行,NAMES设置为idc: sudo docker run -tid --name="idc" 10.249.2.44/idc/idc_docker:[tag]
- NAMES的设置是为了标识此container,等价于container_id
- 连接docker
- 【可启动多个】exit不影响docker: sudo docker exec -ti CONTAINER_ID/NAMES /bin/bash
- exit后会stop docker: sudo docker attach CONTAINER_ID/NAMES
- 修改完数据后exit退出docker,最好是所有docker窗口都需要退出,或者直接停止此container:sudo docker stop CONTAINER_ID/NAMES;
- 提交docker:sudo docker commit -a "author" -m "comments" CONTAINER_ID/NAMES 10.249.2.44/idc/idc_docker:[new_tag]
- 【通常不需要此操作】替换tag:sudo docker tag 10.249.2.44/idc/idc_docker:[tag] 10.249.2.44/idc/idc_docker:[new_tag]
- 提交idc镜像:sudo docker push 10.249.2.44/idc/idc_docker:[new_tag]