用一句话理解Docker

与虚拟机相比,Docker是轻量级的容器。

  1. 镜像,文件存储系统,存储Docker所运行服务的全部文件
  2. 容器,镜像文件加载到系统后以容器的形式存在
  3. 命令,docker的所有命令都是对容器和镜像的管理

镜像

1.1. 镜像的作用,文件存储
1.2. 镜像的创建,使用docker create命令
1.3. 镜像的存储,镜像可以存储在本地或远程的Respository
1.4. 镜像的使用,使用docker run命令需要指定一个镜像名称, docker会自动检测本地-远程相同名字的镜像

容器

2.1. 容器的作用,实现资源隔离的服务
2.2. 容器的创建,使用docker run命令,之后会创建一个容器
2.3. 容器的使用,使用docker exec命令, 进入容器进行操作

docker 组件示意图

命令集

  1. attach Attach to a running container
  2. build Build an image from a Dockerfile
  3. commit Create a new image from a container’s changes
  4. cp Copy files/folders from a container to a HOSTDIR or to STDOUT
  5. create Create a new container
  6. diff Inspect changes on a container’s filesystem
  7. events Get real time events from the server
  8. exec Run a command in a running container
  9. export Export a container’s filesystem as a tar archive
  10. history Show the history of an image
  11. images List images
  12. import Import the contents from a tarball to create a filesystem image
  13. info Display system-wide information
  14. inspect Return low-level information on a container or image
  15. kill Kill a running container
  16. load Load an image from a tar archive or STDIN
  17. login Register or log in to a Docker registry
  18. logout Log out from a Docker registry
  19. logs Fetch the logs of a container
  20. pause Pause all processes within a container
  21. port List port mappings or a specific mapping for the CONTAINER
  22. ps List containers
  23. pull Pull an image or a repository from a registry
  24. push Push an image or a repository to a registry
  25. rename Rename a container
  26. restart Restart a running container
  27. rm Remove one or more containers
  28. rmi Remove one or more images
  29. run Run a command in a new container
  30. save Save an image(s) to a tar archive
  31. search Search the Docker Hub for images
  32. start Start one or more stopped containers
  33. stats Display a live stream of container(s) resource usage statistics
  34. stop Stop a running container
  35. tag Tag an image into a repository
  36. top Display the running processes of a container
  37. unpause Unpause all processes within a container
  38. version Show the Docker version information
  39. wait Block until a container stops, then print its exit code
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值