docker version
docker --help
docker run --help
docker info
镜像命令
1.docker images #查询本地主机上所有的镜像
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest feb5d9fea6a5 4 months ago 13.3kB
centos latest 5d0da3dc9764 4 months ago 231MB
2.docker images --help
3.docker images -aq #-q只显示ID
1.docker search --help
https://hub.docker.com上面也可以搜索镜像
[root@localhost ~]# docker search mysql
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
mysql MySQL is a widely used, open-source relation鈥 12028 [OK]
mariadb MariaDB Server is a high performing open sou鈥 4607 [OK]
mysql/mysql-server Optimized MySQL Server Docker images. Create鈥 900 [OK]
centos/mysql-57-centos7 MySQL 5.7 SQL database server 92
mysql/mysql-cluster Experimental MySQL Cluster Docker images. Cr鈥 92
centurylink/mysql Image containing mysql. Optimized to be link鈥 59 [OK]
databack/mysql-backup Back up mysql databases to... anywhere! 54
prom/mysqld-exporter 46 [OK]
deitch/mysql-backup REPLACED! Please use http://hub.docker.com/r鈥 40 [OK]
tutum/mysql Base docker image to run a MySQL database se鈥 35
linuxserver/mysql A Mysql container, brought to you by LinuxSe鈥 35
schickling/mysql-backup-s3 Backup MySQL to S3 (supports periodic backup鈥 31 [OK]
mysql/mysql-router MySQL Router provides transparent routing be鈥 23
centos/mysql-56-centos7 MySQL 5.6 SQL database server 21
arey/mysql-client Run a MySQL client from a docker container 20 [OK]
fradelg/mysql-cron-backup MySQL/MariaDB database backup using cron tas鈥 18 [OK]
yloeffler/mysql-backup This image runs mysqldump to backup data usi鈥 7 [OK]
openshift/mysql-55-centos7 DEPRECATED: A Centos7 based MySQL v5.5 image鈥 6
idoall/mysql MySQL is a widely used, open-source relation鈥 3 [OK]
devilbox/mysql Retagged MySQL, MariaDB and PerconaDB offici鈥 3
ansibleplaybookbundle/mysql-apb An APB which deploys RHSCL MySQL 3 [OK]
centos/mysql-80-centos7 MySQL 8.0 SQL database server 2
jelastic/mysql An image of the MySQL database server mainta鈥 2
widdpim/mysql-client Dockerized MySQL Client (5.7) including Curl鈥 1 [OK]
vitess/mysqlctld vitess/mysqlctld 1 [OK]
2.docker search mysql --filter
[root@localhost ~]# docker search mysql --filter=STARS=4000
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
mysql MySQL is a widely used, open-source relation鈥 12028 [OK]
mariadb MariaDB Server is a high performing open sou鈥 4607 [OK]
2.docker pull mysql ==docker pull docker.io/library/mysql:latest
[root@localhost ~]# docker pull mysql
Using default tag: latest #不写tag,默认下载最新的
latest: Pulling from library/mysql
72a69066d2fe: Pull complete #分层下载
93619dbc5b36: Pull complete
99da31dd6142: Pull complete
626033c43d70: Pull complete
37d5d7efb64e: Pull complete
ac563158d721: Pull complete
d2ba16033dad: Pull complete
688ba7d5c01a: Pull complete
00e060b6d11d: Pull complete
1c04857f594f: Pull complete
4d7cfa90e6ea: Pull complete
e0431212d27d: Pull complete
Digest: sha256:e9027fe4d91c0153429607251656806cc784e914937271037f7738bd5b8e7709
Status: Downloaded newer image for mysql:latest
docker.io/library/mysql:latest #真实地址
[root@localhost ~]#
3.docker pull mysql:5.7 #指定版本,注意版本号一定要是官网上有的
[root@localhost ~]# docker pull mysql:5.7
5.7: Pulling from library/mysql
72a69066d2fe: Already exists
93619dbc5b36: Already exists
99da31dd6142: Already exists
626033c43d70: Already exists
37d5d7efb64e: Already exists
ac563158d721: Already exists
d2ba16033dad: Already exists
0ceb82207cd7: Pull complete
37f2405cae96: Pull complete
e2482e017e53: Pull complete
70deed891d42: Pull complete
Digest: sha256:f2ad209efe9c67104167fc609cca6973c8422939491c9345270175a300419f94
Status: Downloaded newer image for mysql:5.7
docker.io/library/mysql:5.7
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mysql 5.7 c20987f18b13 5 weeks ago 448MB
mysql latest 3218b38490ce 5 weeks ago 516MB
hello-world lates