帮助命令:
docker version //打印当前docker的基本信息;显示docker的版本信息
docker info //显示docker的系统信息:包括镜像和容器的数量
docker --help //帮助命令
帮助文档的地址:
镜像命令
docker images --help
docker images //显示所有顶级映像、其存储库和标记以及大小
//解释
REPOSITORY: 镜像的仓库源
TAG : 镜像的标签
IMAGE ID :镜像的id
CREATED :镜像的创建时间
SIZE:镜像的大小//可选项
docker search //搜索镜像
//可选项
root@VM-16-2-ubuntu:/home/ubuntu# docker search mysql
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
mysql MySQL is a widely used, open-source relation… 12524 [OK]
mariadb MariaDB Server is a high performing open sou… 4819 [OK]
percona Percona Server is a fork of the MySQL relati… 575 [OK]
phpmyadmin phpMyAdmin - A web interface for MySQL and M… 526 [OK]
bitnami/mysql Bitnami MySQL Docker Image 70 [OK]
linuxserver/mysql-workbench 36
linuxserver/mysql A Mysql container, brought to you by LinuxSe… 35
ubuntu/mysql MySQL open source fast, stable, multi-thread… 31
circleci/mysql MySQL is a widely used, open-source relation… 25
google/mysql MySQL server for Google Compute Engine 21 [OK]
vmware/harbor-db Mysql container for Harbor 10
bitnami/mysqld-exporter 3
ibmcom/mysql-s390x Docker image for mysql-s390x 2
newrelic/mysql-plugin New Relic Plugin for monitoring MySQL databa… 1 [OK]
vitess/mysqlctld vitess/mysqlctld 1 [OK]
nasqueron/mysql 1 [OK]
cimg/mysql 0
silintl/mysql-backup-restore Simple docker image to perform mysql backups… 0 [OK]
drud/mysql-local-57 ddev mysql local container 0
drud/mysql 0
drud/mysql-docker-local-57 This repo has been deprecated, new tags are … 0
drud/mysql-docker-local docker containers for local womysql rk 0 [OK]
docksal/mysql MySQL service images for Docksal - https://d… 0
mirantis/mysql 0
drud/mysqld-exporter 0
root@VM-16-2-ubuntu:/home/ubuntu# docker search mysql --filter=STARS=3000 //搜索出来的镜像就是STARS大于3000的
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
mysql MySQL is a widely used, open-source relation… 12524 [OK]
mariadb MariaDB Server is a high performing open sou… 4819 [OK]
docker pull //下载镜像
docker rmi //删除镜像
容器命令
说明:我们有了镜像才可以创建容器,linux,下载一个ubuntu镜像来测试学习
在docker里面再装一个容器,就好比docker是VM
新建容器并启动
测试
列出所有的运行中的容器:docker ps
退出容器
删除容器
启动和停止容器操作
常用的其他命令
后台启动容器
查看日志
查看容器中的进程信息:类似于 ps
查看镜像的元数据
进入当前正在运行的容器
从容器内拷贝数据到主机上