03 2017 档案

记录一次docker服务启不起来的案子
摘要:时间:2017年3月29日晚 事件: 使终报libapparmor.so.1文件不能读取数据文件。在google和github上找各种方案,都是你抄我,我抄你。然而并没有一个方案能解决。 最后在我相同的机器上看是否有这个文件。结果有些系统有,有些系统没有。在有的系统上把libapparmor.so. 阅读全文

posted @ 2017-03-29 21:03 裤裆内隐藏杀气 阅读(553) 评论(0) 推荐(0)

shutil模块
摘要:copy文件 仅拷贝权限。内容、组、用户均不变 shutil.copymode('random1.py','f2.py') 仅拷贝状态的信息,包括:mode bits, atime, mtime, flags shutil.copystat('f1.log', 'f2.log') shutil.co 阅读全文

posted @ 2017-03-25 13:34 裤裆内隐藏杀气 阅读(156) 评论(0) 推荐(0)

docker配置overlay存储
摘要:1、查看overlay模块是否安装 lsmod | grep over 2、将OverlayFS加到module目录下 echo "overlay" > /etc/modules-load.d/overlay.conf 3、或者使用modprobe命令加载模块 #modprobe overlay 4 阅读全文

posted @ 2017-03-24 14:24 裤裆内隐藏杀气 阅读(3750) 评论(0) 推荐(0)

docker配置direct-lvm存储
摘要:# 关闭docker$ systemctl stop docker# 创建一个物理卷$ pvcreate /dev/xvdf# 创建一个逻辑卷组,命名为docker$ vgcreate docker /dev/xvdf# 创建名为thinpool和thinpoolmeta的逻辑卷,分别占用95%和1 阅读全文

posted @ 2017-03-24 14:21 裤裆内隐藏杀气 阅读(926) 评论(0) 推荐(0)

添加daocloud加速器
摘要:1、注册daocloud官方帐号 2、yum install -y docker 安装docker 3、添加脚本 curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://cd5cd4af.m.daocloud.i 阅读全文

posted @ 2017-03-22 12:13 裤裆内隐藏杀气 阅读(1837) 评论(0) 推荐(0)

docker部署17版本
摘要:Install on CentOS 7.1/7.2 & RHEL 7.0/7.1/7.2/7.3 (YUM-based systems) 1、Add the Docker public key for CS Docker Engine packages: 2、Install yum-utils if 阅读全文

posted @ 2017-03-22 12:02 裤裆内隐藏杀气 阅读(912) 评论(0) 推荐(0)

python random模块
摘要:示例: 简单的随机验证码例: 示例2: 随机验证码4个字符: 阅读全文

posted @ 2017-03-20 23:06 裤裆内隐藏杀气 阅读(164) 评论(0) 推荐(0)

python列表生成式
摘要:1、列表成生式 列表生成 现在有个需求,[1,2,3,4,5,6,7,8,9,10],要求每个值都加1. 生成器: 只有在调用时才会生成相应的数据。 通过列表生成式,我们可以直接创建一个列表。但是,受到内存限制,列表容量肯定是有限的。而且,创建一个包含100万个元素的列表,不仅占用很大的存储空间,如 阅读全文

posted @ 2017-03-17 22:57 裤裆内隐藏杀气 阅读(179) 评论(0) 推荐(0)

高阶函数
摘要:import time def bar(): time.sleep(3) print('in the bar') def test1(func): start_time=time.time() # print(func) func() stop_time=time.time() print('the func is %s' %(sto... 阅读全文

posted @ 2017-03-14 22:37 裤裆内隐藏杀气 阅读(147) 评论(0) 推荐(0)

导航