惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V2EX - 技术
V2EX - 技术
P
Privacy International News Feed
Security Latest
Security Latest
H
Hacker News: Front Page
T
Tenable Blog
The Hacker News
The Hacker News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Security @ Cisco Blogs
Project Zero
Project Zero
O
OpenAI News
AI
AI
Spread Privacy
Spread Privacy
C
CERT Recently Published Vulnerability Notes
The Last Watchdog
The Last Watchdog
G
GRAHAM CLULEY
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Scott Helme
Scott Helme
Application and Cybersecurity Blog
Application and Cybersecurity Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
CXSECURITY Database RSS Feed - CXSecurity.com
NISL@THU
NISL@THU
A
Arctic Wolf
T
Threat Research - Cisco Blogs
PCI Perspectives
PCI Perspectives
N
News and Events Feed by Topic
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
Simon Willison's Weblog
Simon Willison's Weblog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Know Your Adversary
Know Your Adversary
Google Online Security Blog
Google Online Security Blog
罗磊的独立博客
L
LINUX DO - 最新话题
U
Unit 42
S
Security Affairs
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
博客园 - 【当耐特】
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
月光博客
月光博客
Engineering at Meta
Engineering at Meta
腾讯CDC
F
Full Disclosure
Cyberwarzone
Cyberwarzone
S
SegmentFault 最新的问题
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 司徒正美
The Cloudflare Blog

博客园 - 007少侠

使用Recaf编辑汇编代码直接修改java的编译代码class Centos Linux 更换源,原官方源已经不再提供服务 如何在Docker容器中的Linux系统(Ubuntu + Centos Linux)里面使用systemctl Centos Linux 7 搭建邮件服务器(postfix + dovecot) Ubuntu Linux 搭建邮件服务器(postfix + dovecot) 【WSL2】在Windows通过自定义域名访问wsl2中的服务 Python pip pip3 源设置成国内源,阿里云源,清华大学源 利用云服务器实现内网穿透(frp),开启个人电脑(windows)可远程桌面访问 使用docker安装centos7并挂载主机目录 Rust交叉编译Mac编译Linux/Windows平台 Linux下安装dart sdk并配置环境变量 Linux下安装JDK-openj9并配置环境变量 centos7 安装 bbr加速 linux环境常用命令和java/jvm常用命令 mybatis plus + druid多数据源(使用dynamic实现) .gitignore == git添加忽略不生效解决方案 jenkins自动构建项目源码git pull时出现冲突的终极解决方案(git远程覆盖本地分支) mysql查询,根据时间查询:几天前、几天内的数据 spring boot 使用aop实现拦截器
docker将容器打包成镜像并传输至其他服务器部署(可用于容器重新run)
007少侠 · 2020-05-19 · via 博客园 - 007少侠

1、从容器创建一个镜像

使用到的命令:

docker commit :从容器创建一个新的镜像

docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]

OPTIONS说明:

  • -a :提交的镜像作者;
  • -c :使用Dockerfile指令来创建镜像;
  • -m :提交时的说明文字;
  • -p :在commit时,将容器暂停。

例1

docker commit -a "runoob.com" -m "my apache" a404c6c174a2  mymysql:v1 

例2

docker commit -m  ""   -a  ""   [CONTAINER ID]  [给新的镜像命名]
docker commit -m  ""   -a  "" aa myelasticsearch:1.0

二、打包一个镜像

docker save [OPTIONS] IMAGE [IMAGE...]
docker save -o my_ubuntu_v3.tar runoob/ubuntu:v3

三、镜像远程拷贝

使用scp传输至其他服务器:

从本地复制到远程:

scp local_file remote_username@remote_ip:remote_folder 
或者 
scp local_file remote_username@remote_ip:remote_file 
或者 
scp local_file remote_ip:remote_folder 
或者 
scp local_file remote_ip:remote_file 

从远程复制到本地

scp root@www.runoob.com:/home/root/others/music /home/space/music/1.mp3 
scp -r www.runoob.com:/home/root/others/ /home/space/music/

 四、新服务器载入镜像

OPTIONS 说明:

  • --input , -i : 指定导入的文件,代替 STDIN

  • --quiet , -q : 精简输出信息。

如:

$ docker load --input fedora.tar