Dockers

作者: 不再_犹豫 | 来源:发表于2020-07-22 14:28 被阅读0次

win10家庭版安装

参考1:https://blog.csdn.net/W1427259949/article/details/104716365/
会出现错误,禁用hyper-v即可,见参考2
参考2:
https://anjia0532.github.io/2019/08/26/win-10-virtualbox-verr-nem-vm-create/

ubuntu安装

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
docker-compose安装

阿里云镜像仓库

https://cr.console.aliyun.com/cn-hangzhou/instances/repositories

镜像加速配置
image.png

docker入门文章

https://blog.csdn.net/S_gy_Zetrov/article/details/78161154?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.edu_weight&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.edu_weight

dockers命令

  • 查看镜像
    docker images
  • 拉取镜像
    docker pull ubuntu:16.04
  • 启动镜像:bash形式启动
    docker run -it chug/ubuntu14.04x64 /bin/bash
  • 退出容器
    1.使用exit,命令退出,则容器的状态处于Exit,而不是后台运行。
    2.使用快捷键 ctrl+p+q 退出,此时容器的状态为Up。
  • 查看当前正在运行的容器
    docker ps -a
  • 操作容器
    docker start aa97ba3292ce
    docker stop aa97ba3292ce
    docker restart aa97ba3292ce
  • 删除镜像或容器
    1.删除容器:docker rm container_id
    2.删除镜像:docker rmi image_id

相关文章

网友评论

      本文标题:Dockers

      本文链接:https://www.haomeiwen.com/subject/zrkfkktx.html