Get started with docker

Docker concepts:
Docker is a platform for developers and sysadmins to develop, deploy, and run applications with containers

Containerization's advantages:

  • Flexible: Even the most complex applications can be containerized
  • Lightweight: Containers leverage and share the host kernel
  • Interchangeable: You can deploy updates and upgrades on-the-fly
  • Portable: You can build locally, deploy to the cloud, and run anywhere
  • Scalable: You can increase and automatically distribute container replicas
  • Stackable: You can stack services vertically and on-the-fly

Images and containers

  • A container is launched by running an image. An image is an executable package that includes everything needed to run an application--the code, a runtime, libraries, environment variables, and configuration files.

  • A container is a runtime instance of an image--what the image becomes in memory when executed (that is, an image with state, or a user process). You can see a list of your running containers with the command, docker ps, just as you would in Linux.

Containers and virtual machines

  • A container runs natively on Linux and shares the kernel of the host machine with other containers. It runs a discrete process, taking no more memory than any other executable, making it lightweight.

  • By contrast, a virtual machine (VM) runs a full-blown “guest” operating system with virtual access to host resources through a hypervisor. In general, VMs provide an environment with more resources than most applications need.

  1. list the images that was downloaded to your machine

docker image ls

  1. list containers which exits after displaying its message. If it were still running, you would not need to use --all option

docker container list --all

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • PLEASE READ THE FOLLOWING APPLE DEVELOPER PROGRAM LICENSE...
    念念不忘的阅读 14,599评论 5 6
  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,178评论 0 10
  • 以下原文转载于(https://docs.docker.com/docker-for-mac/)(想找中文版的最新...
    Veekend阅读 12,259评论 0 17
  • 作为一个在华北平原长大的人,草原是一个遥远的存在,对其最初的印象来源于小学课本上“天苍苍,野茫茫,风吹草低见牛羊”...
    蓝宁读书室阅读 4,583评论 0 1
  • 跑步真好,一周不喘,二周不酸,三周见效,一月习惯,习惯后不跑不适,跑了身轻气爽。 渐渐的,慢慢的习惯了,喜欢了。喜...
    贾云虎阅读 1,072评论 0 1

友情链接更多精彩内容