码迷,mamicode.com
首页 > 其他好文 > 详细

docker镜像操作

时间:2019-10-17 01:21:31      阅读:108      评论:0      收藏:0      [点我收藏+]

标签:container   bec   contain   script   div   Superviso   new   serve   pen   

仓库配置文件默认值为docker官方镜像地址

# cat /etc/docker/daemon.json 
{
  "registry-mirror": [
    "https://registry.docker-cn.com"
  ]
}

查看centos镜像

# docker search centos
NAME                               DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
centos                             The official build of CentOS.                   5615                [OK]                
ansible/centos7-ansible            Ansible on Centos7                              124                                     [OK]
jdeathe/centos-ssh                 OpenSSH / Supervisor / EPEL/IUS/SCL Repos - …   113                                     [OK]
consol/centos-xfce-vnc             Centos container with "headless" VNC session…   99                                      [OK]
centos/mysql-57-centos7            MySQL 5.7 SQL database server                   63                                      
imagine10255/centos6-lnmp-php56    centos6-lnmp-php56                              57                                      [OK]
tutum/centos                       Simple CentOS docker image with SSH access      44                                      
centos/postgresql-96-centos7       PostgreSQL is an advanced Object-Relational …   39                                      
kinogmt/centos-ssh                 CentOS with SSH                                 29                                      [OK]
centos/php-56-centos7              Platform for building and running PHP 5.6 ap…   22                                      
pivotaldata/centos-gpdb-dev        CentOS image for GPDB development. Tag names…   10                                      
drecom/centos-ruby                 centos ruby                                     6                                       [OK]
centos/tools                       Docker image that has systems administration…   4                                       [OK]
darksheer/centos                   Base Centos Image -- Updated hourly             3                                       [OK]
mamohr/centos-java                 Oracle Java 8 Docker image based on Centos 7    3                                       [OK]
pivotaldata/centos                 Base centos, freshened up a little with a Do…   3                                       
pivotaldata/centos-mingw           Using the mingw toolchain to cross-compile t…   2                                       
miko2u/centos6                     CentOS6 日本語環境                                   2                                       [OK]
pivotaldata/centos-gcc-toolchain   CentOS with a toolchain, but unaffiliated wi…   2                                       
mcnaughton/centos-base             centos base image                               1                                       [OK]
indigo/centos-maven                Vanilla CentOS 7 with Oracle Java Developmen…   1                                       [OK]
blacklabelops/centos               CentOS Base Image! Built and Updates Daily!     1                                       [OK]
pivotaldata/centos7-dev            CentosOS 7 image for GPDB development           0                                       
smartentry/centos                  centos with smartentry                          0                                       [OK]
pivotaldata/centos6.8-dev          CentosOS 6.8 image for GPDB development         0                                       

下载centos镜像

# docker pull centos
Using default tag: latest
latest: Pulling from library/centos
729ec3a6ada3: Pull complete 
Digest: sha256:f94c1d992c193b3dc09e297ffd54d8a4f1dc946c37cbeceb26d35ce1647f88d9
Status: Downloaded newer image for centos:latest
docker.io/library/centos:latest

查看下载的镜像

# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
centos              latest              0f3e07c0138f        2 weeks ago         220MB

为镜像创建一个新的tag

# docker tag centos:latest centos:version7
# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
centos              latest              0f3e07c0138f        2 weeks ago         220MB
centos              version7            0f3e07c0138f        2 weeks ago         220MB

删除镜像

# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
centos              latest              0f3e07c0138f        2 weeks ago         220MB
centos              version7            0f3e07c0138f        2 weeks ago         220MB
# docker rmi centos:latest
Untagged: centos:latest
# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
centos              version7            0f3e07c0138f        2 weeks ago         220MB

 

docker镜像操作

标签:container   bec   contain   script   div   Superviso   new   serve   pen   

原文地址:https://www.cnblogs.com/ilifeilong/p/11689418.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!