[容器]python搭建简易服务器+docker导入多个镜像shell脚本
从其他机器导出来的docker镜像,集中地放在某台上,其他的机器执行
curl xxx:8000/load_images.sh 来导入镜像,简单方便
使用python简易web服务器. (在镜像目录下执行)
python -m SimpleHTTPServer
root@test52 ~/images/kargo6 # ll
总用量 2.1G
-rw-r--r-- 1 root root 6.4M 3月 20 15:49 andyshinn_dnsmasq_2.72.tar
-rw-r--r-- 1 root root 1.3M 3月 20 15:42 busybox_latest.tar
-rw-r--r-- 1 root root 65M 3月 20 15:43 calico_cni_v1.5.6.tar
-rw-r--r-- 1 root root 63M 3月 29 13:46 calico_cni_v1.6.2.tar.gz
-rw-r--r-- 1 root root 43M 3月 20 15:42 calico_ctl_v1.1.0-rc8.tar
-rw-r--r-- 1 root root 43M 3月 29 13:53 calico_ctl_v1.1.0.tar.gz
-rw-r--r-- 1 root root 208M 3月 20 15:42 calico_node_v1.1.0-rc8.tar
-rw-r--r-- 1 root root 208M 3月 29 13:54 calico_node_v1.1.0.tar.gz
-rw-r--r-- 1 root root 47M 3月 20 15:50 gcr.io_google_containers_cluster-proportional-autoscaler-amd64_1.1.1.tar
-rw-r--r-- 1 root root 8.2M 3月 20 15:43 gcr.io_google_containers_exechealthz-amd64_1.1.tar
-rw-r--r-- 1 root root 53M 3月 20 15:43 gcr.io_google_containers_kubedns-amd64_1.7.tar
-rw-r--r-- 1 root root 5.2M 3月 20 15:43 gcr.io_google_containers_kube-dnsmasq-amd64_1.3.tar
-rw-r--r-- 1 root root 748K 3月 20 15:43 gcr.io_google_containers_pause-amd64_3.0.tar
-rw-r--r-- 1 root root 750 3月 29 14:07 load_images.sh
-rw-r--r-- 1 root root 54M 3月 20 15:43 nginx_1.11.4-alpine.tar
-rw-r--r-- 1 root root 42M 3月 20 15:43 quay.io_coreos_etcd_v3.0.6.tar
-rw-r--r-- 1 root root 33M 3月 29 13:30 quay.io_coreos_etcd_v3.1.5.tar.gz
-rw-r--r-- 1 root root 626M 3月 20 15:43 quay.io_coreos_hyperkube_v1.5.4_coreos.0.tar
-rw-r--r-- 1 root root 649M 3月 29 13:18 quay.io_coreos_hyperkube_v1.6.0_coreos.0.tar.gz
root@test52 ~/images/kargo6 # cat load_images.sh
HTTP_SERVER=192.168.6.52:8000
load_images()
{
images=(
andyshinn_dnsmasq_2.72.tar
busybox_latest.tar
calico_cni_v1.6.2.tar.gz
calico_ctl_v1.1.0.tar.gz
calico_node_v1.1.0.tar.gz
gcr.io_google_containers_cluster-proportional-autoscaler-amd64_1.1.1.tar
gcr.io_google_containers_exechealthz-amd64_1.1.tar
gcr.io_google_containers_kubedns-amd64_1.7.tar
gcr.io_google_containers_kube-dnsmasq-amd64_1.3.tar
gcr.io_google_containers_pause-amd64_3.0.tar
nginx_1.11.4-alpine.tar
quay.io_coreos_etcd_v3.1.5.tar.gz
quay.io_coreos_hyperkube_v1.6.0_coreos.0.tar.gz )
for i in "${!images[@]}"; do
curl -L http://$HTTP_SERVER/${images[$i]} > /root/images/${images[$i]}
docker load < /root/images/${images[$i]}
done
}
load_images
root@test52 ~/images/kargo6 # pwd
/root/images/kargo6
[容器]python搭建简易服务器+docker导入多个镜像shell脚本的更多相关文章
- python搭建简易服务器实例参考
有关python搭建简易服务器的方法. 需求分析: 省油宝用户数 已经破了6000,原有的静态报表 已经变得臃肿不堪, 每次打开都要缓上半天,甚至浏览器直接挂掉 采用python搭建一个最最简易的 w ...
- Python搭建Web服务器,与Ajax交互,接收处理Get和Post请求的简易结构
用python搭建web服务器,与ajax交互,接收处理Get和Post请求:简单实用,没有用框架,适用于简单需求,更多功能可进行扩展. python有自带模块BaseHTTPServer.CGIHT ...
- python搭建本地服务器
python搭建本地服务器 python3以上版本 'python3 -m http.server 8000' 默认是8000端口,可以指定端口,打开浏览器输入http://127.0.0.1:800 ...
- Python使用socketServer包搭建简易服务器过程详解
官方提供了socketserver包去方便我们快速的搭建一个服务器框架. 很多人学习python,不知道从何学起.很多人学习python,掌握了基本语法过后,不知道在哪里寻找案例上手.很多已经做案例的 ...
- python3+socket搭建简易服务器
踩了一上午的坑之后,终于对网络编程有了一点大致的.基本的了解.真的是0基础,之前对socket网络编程一点都不知道.(感觉自己与时代脱轨....) 首先我想对这些美妙的专业术语进行一番搜索: 服务器: ...
- 使用Python搭建http服务器
David Wheeler有一句名言:“计算机科学中的任何问题,都可以通过加上另一层间接的中间层解决.”为了提高Python网络服务的可移植性,Python社区在PEP 333中提出了Web服务器网关 ...
- Python搭建简易HTTP服务(3.x版本和2.x版本的)
废话不多说,我们工作时经常会用到需要HTTP服务,如果不想搞那些复杂的Apache.IIS服务器等,这时我们就可以用python帮我们搭建一个简单的服务器.操作如下: 1.下载并安装一个python: ...
- 使用Python3.7.0搭建简易服务器
一.下载并安装Python 官网地址 二.新建start_server.bat 在需要搭建服务器的根目录位置,新建一个start_server.bat文件 内容 python -m http.serv ...
- python 搭建http服务器和ftp服务器
默认安装版本为pytho2.7 http服务器搭建: 进入要开放访问的目录下,执行命令:python -m SimpleHTTPServer 9000 显示上述表示安装成功,且http服务的端口为:9 ...
随机推荐
- 26、Django实战第26天:配置全局导航
1.编辑index.html,继承base.html 2.编辑base.html,根据是否登录不同显示 问题:当我们选中一个导航,选中样式并没有成为选中的状态 因此我们编辑base.html对导航中进 ...
- ASP.NET Core 2.2 基础知识(十四) WebAPI Action返回类型(未完待续)
要啥自行车,直接看手表 //返回基元类型 public string Get() { return "hello world"; } //返回复杂类型 public Person ...
- 如何加快exp/imp的速度 - direct=y
http://blog.itpub.net/35489/viewspace-613625 Oracle9i 或 10g . 1. 内存中关系到exp的速度的是 large_pool_siz ...
- 【块状树】【博弈论】bzoj3729 Gty的游戏
块状树,每个块的根记录一下当前块内距块根为奇数距离的异或和和偶数距离的异或和,询问的时候讨论一下即可. 总的节点数可能超过50000. #include<cstdio> #include& ...
- Linux下打包命令tar
转:http://blog.chinaunix.net/uid-29021161-id-3922752.html Linux下最常用的打包程序是tar,用tar命令打成的包文件通常以.tar结尾 1. ...
- iOS页面跳转及数据传递
转: http://blog.csdn.net/wang9834664/article/details/8025571 iOS页面跳转: 第一种 [self.navigationController ...
- Remote procedure call (RPC)
Remote procedure call (RPC) (using the .NET client) Prerequisites This tutorial assumes RabbitMQ isi ...
- jquery获取select下拉框的前一个,后一个,第一个,最后一个option对象
$("select option:selected").next(); <select> <option value="1" selected ...
- UVA-10603-Fill(BFS+优先队列)
There are three jugs with a volume of a, b and c liters. (a, b, and c are positive integers not grea ...
- ubuntu14.04使用samba共享文件
samba是linux中常用的共享文件的软件 ubuntu12.04及以上版本中已经安装了samba 开始配置: samba配置文件: /etc/samba/smb.conf可以修改配置文件来设置sa ...