摘要: • bridge –net=bridge 默认网络,Docker启动后创建一个docker0网桥,默认创建的容器也是添加到这个网桥中。 • host –net=host 容器不会获得一个独立的network namespace,而是与宿主机共用一个。这就意味着容器不会有自己的网卡信息,而是使用宿主 机的。容器除了网络,其他都是隔离的。 • none –net=... 阅读全文
posted @ 2019-03-14 17:48 kkblog 阅读(454) 评论(0) 推荐(0) 编辑
摘要: 将数据从宿主机到容器的三种方式: 1,volumes:docker管理宿主机文件系统的一部分(/var/lib/docker/volumes)保存数据的最佳方式 2,bind mounts 将宿主机上的任意位置的文件或者目录挂在到容器 (--mount type=bind,src=源目录,dst=目标目录) 3,tmpfs:挂载存储在主机系统的内存中,而不会写入主机的文件系统。如果不希望将... 阅读全文
posted @ 2019-03-13 17:01 kkblog 阅读(2346) 评论(0) 推荐(0) 编辑
摘要: -i, –interactive 交互式 -t, –tty 分配一个伪终端 -d, –detach 运行容器到后台 -e, –env 设置环境变量 -p, –publish list 发布容器端口到主机 -P, –publish-all 发布容器所有EXPOSE的端口到宿主机随机端口 –name string 指定容器名称 -h, –hostname 设置容器主机名 ***–ip string ... 阅读全文
posted @ 2019-03-12 16:53 kkblog 阅读(2583) 评论(0) 推荐(0) 编辑
摘要: docekr 常用命令 1:ls 列出容器 $ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE jdk 8 fec5236a803b 48 seconds ag... 阅读全文
posted @ 2019-03-12 16:07 kkblog 阅读(499) 评论(0) 推荐(0) 编辑
摘要: # cat user_create.sh echo -n "创建用户输入C,删除用户输入D!" read name function monitor() { if [ "$name" == "C" ] || [ "$name" == "c" ];then function_create elif [ "$name" == "D" ] || [ "$name" == "d" ]; ... 阅读全文
posted @ 2019-03-08 17:39 kkblog 阅读(359) 评论(0) 推荐(0) 编辑
摘要: echo -n "创建用户输入C,删除用户输入D!" read name function monitor() { if [ "$name" == "C" ] || [ "$name" == "c" ];then function_create elif [ "$name" == "D" ] || [ "$name" == "d" ]; then function_rm ... 阅读全文
posted @ 2019-03-07 18:36 kkblog 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 介绍 OneinStack支持以下数种环境组合: LNMP(Linux + Nginx+ MySQL+ PHP) LAMP(Linux + Apache+ MySQL+ PHP) LNMPA(Linux + Nginx+ MySQL+ PHP+ Apache):Nginx处理静态,Apache(mo 阅读全文
posted @ 2018-12-20 10:58 kkblog 阅读(874) 评论(0) 推荐(0) 编辑
摘要: 1,接口链接 https://xxx.com/xqAppServer/api/APPBizRest/idfaDuplicateRemove/v1/?sysIdfa=661743D1-A76E-498A-B4D8-F4E239654569&adveriseChannel=3 2,讲json数据写入文本 阅读全文
posted @ 2018-12-18 11:59 kkblog 阅读(2992) 评论(0) 推荐(1) 编辑
摘要: #!/bin/bash #hc source /etc/profile iplist=`netstat -ntu | awk '{print $5}'| cut -d':' -f1| sort |uniq -c | sed 'N;$d;P;D' | awk '{if($1>100)print $2} 阅读全文
posted @ 2018-09-26 10:47 kkblog 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 问题: 在centos系统下,tomcat8.0.36控制台日志打印会出现中文乱码。 解决方案: 在catalina.sh里加上 JAVA_OPTS="-Dfile.encoding=UTF8 -Dsun.jnu.encoding=UTF8",然后重启即可。 注意:liunx下如果是已经加入服务的, 阅读全文
posted @ 2018-07-19 14:51 kkblog 阅读(183) 评论(0) 推荐(0) 编辑