What happens when you run a container?
来源:互联网 发布:手机淘宝货到付款骗局 编辑:程序博客网 时间:2024/05/20 14:19
Either by using the docker
binary or via the API, the Docker client tells the Docker daemon to run a container.
$ docker run -i -t ubuntu /bin/bash
Let’s break down this command. The Docker client is launched using the docker
binary with the run
option telling it to launch a new container. The bare minimum the Docker client needs to tell the Docker daemon to run the container is:
- What Docker image to build the container from, here
ubuntu
, a base Ubuntu image; - The command you want to run inside the container when it is launched, here
/bin/bash
, to start the Bash shell inside the new container.
So what happens under the hood when we run this command?
In order, Docker does the following:
- Pulls the
ubuntu
image: Docker checks for the presence of theubuntu
image and, if it doesn’t exist locally on the host, then Docker downloads it from Docker Hub. If the image already exists, then Docker uses it for the new container. - Creates a new container: Once Docker has the image, it uses it to create a container.
- Allocates a filesystem and mounts a read-write layer:The container is created in the file system and a read-write layer is added to the image.
- Allocates a network / bridge interface: Creates a network interface that allows the Docker container to talk to the local host.
- Sets up an IP address: Finds and attaches an available IP address from a pool.
- Executes a process that you specify: Runs your application, and;
- Captures and provides application output: Connects and logs standard input, outputs and errors for you to see how your application is running.
0 0
- What happens when you run a container?
- What really happens when you navigate to a URL
- What really happens when you navigate to a URL
- What really happens when you navigate to a URL
- What really happens when you navigate to a URL
- what happens when you type in a URL in browser
- What really happens when you navigate to a URL
- What really happens when you navigate to a URL
- What happens when you type a URL in browser
- what happens when you type a url in browser
- What really happens when you navigate to a URL
- What really happens when you navigate to a URL
- 【翻译】What really happens when you navigate to a URL
- What really happens when you navigate to a URL
- What really happens when you navigate to a URL
- What happens when you visit a website? What exactly goes on after you type a URL into a browser?
- What really happens when you navigate to a URL--网页url跳转过程
- 在浏览器中输入URL之后会发生什么(what happens when you type in a URL in browser)
- iOS应用生命周期相关内容
- node与ES6系列4——class
- jdk配置正确但是tomcat服务器启动时一闪而过
- 从Java回调机制分析Android动态加载布局过程中出现的IllgalStateException
- socat的安装与使用
- What happens when you run a container?
- 安卓程序运行中突然崩溃的时候打印日志到本地
- windows DLL动态连接库文件的实现和应用
- 基于 intel MKL 的对称矩阵特征值求解器
- 《java从入门到精通》-笔记
- linux 设置用户id
- 了解Java中的线程
- 圆形图片CircleImageView
- Tomcat域名或IP地址访问方式配置方法