Docker实战(一):Docker安装与基础命令
来源:互联网 发布:js在html中的位置 编辑:程序博客网 时间:2024/05/22 12:23
Docker安装
我是在Ubuntu 16上安装的docker,linux安装docker只需要一个命令:
sudo apt-get install docker.io
运行完后,可以在终端输入docker看到以下信息证明我们安装成功了
注:提示权限问题就添加sudo
docker
Usage: docker [OPTIONS] COMMAND [arg…]
docker daemon [ –help | … ]
docker [ –help | -v | –version ]A self-sufficient runtime for containers.
Options:
–config=~/.docker Location of client config files
-D, –debug Enable debug mode
-H, –host=[] Daemon socket(s) to connect to
-h, –help Print usage
-l, –log-level=info Set the logging level
–tls Use TLS; implied by –tlsverify
–tlscacert=~/.docker/ca.pem Trust certs signed only by this CA
–tlscert=~/.docker/cert.pem Path to TLS certificate file
–tlskey=~/.docker/key.pem Path to TLS key file
–tlsverify Use TLS and verify the remote
-v, –version Print version information and quitCommands:
attach Attach to a running container
build Build an image from a Dockerfile
commit Create a new image from a container’s changes
cp Copy files/folders between a container and the local filesystem
create Create a new container
diff Inspect changes on a container’s filesystem
events Get real time events from the server
exec Run a command in a running container
export Export a container’s filesystem as a tar archive
history Show the history of an image
images List images
import Import the contents from a tarball to create a filesystem image
info Display system-wide information
inspect Return low-level information on a container or image
kill Kill a running container
load Load an image from a tar archive or STDIN
login Register or log in to a Docker registry
logout Log out from a Docker registry
logs Fetch the logs of a container
network Manage Docker networks
pause Pause all processes within a container
port List port mappings or a specific mapping for the CONTAINER
ps List containers
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rename Rename a container
restart Restart a container
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
save Save an image(s) to a tar archive
search Search the Docker Hub for images
start Start one or more stopped containers
stats Display a live stream of container(s) resource usage statistics
stop Stop a running container
tag Tag an image into a repository
top Display the running processes of a container
unpause Unpause all processes within a container
update Update resources of one or more containers
version Show the Docker version information
volume Manage Docker volumes
wait Block until a container stops, then print its exit codeRun ‘docker COMMAND –help’ for more information on a command.
安装完以后,也可运行以下命令查看版本信息:
docker -v
docker version
docker info
当利用 docker run 来创建容器时,Docker 在后台运行的标准操作包括:
- 检查本地是否存在指定的镜像,不存在就从公有仓库下载
- 利用镜像创建并启动一个容器
- 分配一个文件系统,并在只读的镜像层外面挂载一层可读写层
- 从宿主主机配置的网桥接口中桥接一个虚拟接口到容器中去
- 从地址池配置一个 ip 地址给容器
- 执行用户指定的应用程序
- 执行完毕后容器被终止
- Docker实战(一):Docker安装与基础命令
- Docker实战(一):Docker基础命令
- Docker实战(一):Docker基础命令
- Docker实战(一):Docker基础命令
- docker 实战---安装一个基础镜像 (一)
- docker实战一之Centos安装docker
- Docker概念,安装与基础命令
- Docker基础系列(一)Centos6.4离线安装docker
- Docker 基础(一) window下安装 docker
- Docker实战:镜像与容器基础命令
- Docker 菜鸟笔记(二)Docker 安装与常见命令
- Docker实战(四):Docker安装JDK
- Docker实战(五):Docker安装Tomcat
- Docker实战(六):Docker安装Redis
- Docker实战(七):Docker安装MongoDB
- Docker实战(四):Docker安装JDK
- Docker实战(五):Docker安装Tomcat
- Docker实战(六):Docker安装Redis
- c#用账号密码访问公共盘,pdf打印文档
- 托福准备
- exe4j软件的使用及常见问题
- poj 1151 线段树+离散化+扫描线 (矩形面积并
- 数据结构实验之数组二:稀疏矩阵
- Docker实战(一):Docker安装与基础命令
- fragment 的切换并且解决重叠的问题
- 不会用ant打包、部署项目的工程师,不是一个好程序员(测试)
- UINavigationBar属性及返回按钮更改小结
- Linux下Eclipse中文乱码解决方案
- POJ 3660 Floyd传递闭包
- 27:函数作用域 28 动态调用函数 包含函数作业
- Tomcat8.x web.xml监听器的配置的解析->监听器的实例化->监听器的调用
- char *a 与char a[] 的区别