zoukankan      html  css  js  c++  java
  • 导出、恢复、上传镜像

    [root@localhost ~]# docker images
    REPOSITORY          TAG                 IMAGE ID            CREATED              VIRTUAL SIZE
    centos-6-x86        latest              8fca9486a39b        About a minute ago   341.3 MB
    centos_with_net     latest              3e8ea8607f08        2 weeks ago          294.9 MB
    centos              latest              9baab0af79c4        4 weeks ago          196.7 MB
    
    

    把现有镜像导出为一个文件

    [root@localhost ~]# docker save -o centos_with_net.tar 3e8ea8607f08

    3e8ea8607f08是镜像的ID,也可以换成镜像名字centos_with_net,导出的文件生成在当前目录下

    [root@localhost ~]# ls
    anaconda-ks.cfg              centos_with_net.tar  install.log.syslog  模板  图片  下载  桌面
    centos-6-x86-minimal.tar.gz  install.log          公共的              视频  文档  音乐
    [root@localhost ~]# du -sh centos_with_net.tar
    289M    centos_with_net.tar
    

    用导出文件恢复本地镜像

    [root@localhost ~]# docker load < centos_with_net.tar

    或者

    [root@localhost ~]# docker load --input centos_with_net.tar

    上传镜像

    可以使用docker push命令上传镜像到仓库,默认上传到DockerHub官方仓库,命令格式为docker push NAME[:TAG]。

    用户在DockerHub网站注册后,即可上传自制的镜像。

    docker push image_name

    第一次使用时,会提示输入登录信息或进行注册。

  • 相关阅读:
    wx小程序用canvas生成图片流程与注意事项
    mysql导入导出csv
    机房测速
    python 后台服务
    python获取硬件信息模块
    nagios外部命令接口
    nginx下的nagios pnp4nagios
    supervisor运行virtualenv环境下的nagios-api
    check_mk通用应用检测插件
    pnp4nagios 性能调优
  • 原文地址:https://www.cnblogs.com/Genesis2018/p/8304721.html
Copyright © 2011-2022 走看看