- 运行一个容器(container)
- 📎">什么是容器(container)?📎
- 📎">什么是容器镜像?📎
运行一个容器(container)

docker run -d -p 80:80 docker/getting-started
- -d 以分离模式(在后台)运行容器
- -p 80:80 将主机的端口80映射到容器中的端口80
- docker/getting-started 要使用的镜像
什么是容器(container)?📎
Now that you’ve run a container, what_is_a container? Simply put, a container is simply another process on your machine that has been isolated from all other processes on the host machine. That isolation leverageskernel namespaces and cgroups, features that have been in Linux for a long time. Docker has worked to make these capabilities approachable and easy to use.
既然已经运行了容器,那么什么是容器?简单地说,容器只是您机器上与主机上所有其他进程隔离的另一个进程。这种隔离利用了内核名称空间和cgroup,这些特性在Linux中已经存在很长时间了。Docker致力于使这些功能易于接近和使用。
什么是容器镜像?📎
简而言之, 一个镜像包含可以使项目运行的完整内容

