docker常用的命令

[root@docker web]# docker version
 
Client: Docker Engine - Community
 
 Version:           20.10.8
 
 API version:       1.41
 
 Go version:        go1.16.6
 
 Git commit:        3967b7d
 
 Built:             Fri Jul 30 19:53:39 2021
 
 OS/Arch:           linux/amd64
 
 Context:           default
 
 Experimental:      true
 
 
 
Server: Docker Engine - Community
 
 Engine:
 
  Version:          20.10.8
 
  API version:      1.41 (minimum version 1.12)
 
  Go version:       go1.16.6
 
  Git commit:       75249d8
 
  Built:            Fri Jul 30 19:52:00 2021
 
  OS/Arch:          linux/amd64
 
  Experimental:     false
 
 containerd:
 
  Version:          1.4.9
 
  GitCommit:        e25210fe30a0a703442421b0f60afac609f950a3
 
 runc:
 
  Version:          1.0.1
 
  GitCommit:        v1.0.1-0-g4144b63
 
 docker-init:
 
  Version:          0.19.0
 
  GitCommit:        de40ad0

 查看镜像:docker images

[root@docker web]# docker images
 
REPOSITORY          TAG       IMAGE ID       CREATED        SIZE
 
daocloud.io/nginx   latest    6084105296a9   5 months ago   133MB
 
hello-world         latest    d1165f221234   5 months ago   13.3kB

 删除镜像:docker rmi 镜像名

[root@docker ~]# docker rmi mysql:latest
 
Untagged: mysql:latest
 
Untagged: mysql@sha256:8b928a5117cf5c2238c7a09cd28c2e801ac98f91c3f8203a8938ae51f14700fd
 
Deleted: sha256:c60d96bd2b771a8e3cae776e02e55ae914a6641139d963defeb3c93388f61707
 
Deleted: sha256:5c8c91273faab368a6d659156f2569fa9f40b0e0139222fdf9eef073df4b3797
 
Deleted: sha256:33d8196a776f42a16f10395b66f10f91443b1fb194bca2a9b8dfb0deff5babb8
 
Deleted: sha256:3ec63323025213e3cabf17ac7933506dc5520ec49226a9764418f77ea60d35c8
 
Deleted: sha256:1f129b005b51b049ac84ed0775b82096d480b7d9308a9a137697f37346562266
 
Deleted: sha256:80ed209bd0434faa1ce31fbaab8508124dddf8f6502c5736ee4b8e46697a8477

查找docker里的镜像:docker search 镜像名

[root@docker web]# docker search nginx
 
NAME                              DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
 
nginx                             Official build of Nginx.                        15297     [OK]      
 
jwilder/nginx-proxy               Automated Nginx reverse proxy for docker con…   2058                 [OK]
 
richarvey/nginx-php-fpm           Container running Nginx + PHP-FPM capable of…   815                  [OK]
 
jc21/nginx-proxy-manager          Docker container for managing Nginx proxy ho…   228  

docker下载镜像:docker pull 镜像名(指定版本则镜像名:版本号)默认去hubdocker下载

  1. [root@docker web]# docker pull mysql
     
    Using default tag: latest
     
    latest: Pulling from library/mysql
     
    33847f680f63: Pull complete
     
    5cb67864e624: Pull complete
     
    1a2b594783f5: Pull complete
     
    b30e406dd925: Pull complete
     
    48901e306e4c: Pull complete
     
    603d2b7147fd: Pull complete
     
    802aa684c1c4: Pull complete
     
    715d3c143a06: Pull complete
     
    6978e1b7a511: Pull complete
     
    f0d78b0ac1be: Pull complete
     
    35a94d251ed1: Pull complete
     
    36f75719b1a9: Pull complete
     
    Digest: sha256:8b928a5117cf5c2238c7a09cd28c2e801ac98f91c3f8203a8938ae51f14700fd
     
    Status: Downloaded newer image for mysql:latest
     
    docker.io/library/mysql:latest

 

文章链接: https://www.mfisp.com/18034.html

文章标题:docker常用的命令

文章版权:梦飞科技所发布的内容,部分为原创文章,转载请注明来源,网络转载文章如有侵权请联系我们!

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA打赏
共{{data.count}}人
人已打赏
建站教程投稿分享

docker隔离机制

2023-3-8 15:59:32

建站教程投稿分享

Linux的权限

2023-3-9 13:42:35

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索

梦飞科技 - 最新云主机促销服务器租用优惠