Docker Tips and Tricks
2019-09-29 本文已影响0人
ELVENITO
未经许可请勿转载。
Please do not reprint this article without permission.
Useful Docs
- Docker Documentation
- 如何用Docker成为更高效的数据科学家?
- docker pull获取镜像并自定义仓库
- docker文档
- docker安装
- docker权限问题解决
- docker push到本地仓库
- docker容器与镜像的区别
nvidia-docker
Dockerfile
Common Usage
- Basic commands
docker build -t docker-repository/image-name:tag /dir/where/Dockerfile/is/
# docker build -t registry.k8s.imagedt.online:15781/labeler-task-tools:cuda9 .
docker push docker-repository/image-name:tag
# docker push registry.k8s.imagedt.online:15781/labeler-task-tools:cuda9
docker pull docker-repository/image-name:tag
# docker pull registry.k8s.imagedt.online:15781/labeler-task-tools:cuda9
docker commit {container ID} docker-repository/image-name:tag
- Initiate a container (with R/W layer on top of an image)
nvidia-docker run -it --rm -v /volume:/volume --add-host host:127.0.0.1 docker-image:tag /bin/bash