
docker
oToyix
好记性,不如烂笔头。且记且珍惜!!!!!!
展开
-
docker容器访问不了外网
二、检查docker启动时是否加载。没有上面上显示,则需要加载一下。一、检查是否开启转发。三、重启docker。原创 2023-07-12 12:11:27 · 636 阅读 · 0 评论 -
loki + promtail + grafana 日志看板平台
lpg原创 2022-07-15 12:04:11 · 926 阅读 · 0 评论 -
rocketmq docker
RocketMQ :由阿里巴巴团队开发,贡献给了apache;是一个队列模型的消息中间件;具有高性能、高可靠、高实时、分布式的特点;它是一个采用 Java 语言开发的分布式的消息系统.原创 2022-06-24 17:34:13 · 712 阅读 · 0 评论 -
Alpine笔记
强烈建议update一下# apk updatefetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gzfetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gzv3.9.6-143-ga5f34edab6 [http://dl-cdn.alpinelinux.org/alpine/v3.9/main]v原创 2022-02-23 17:42:20 · 1541 阅读 · 0 评论 -
docker 容器 绕过了firewalld规则可直接被外部访问,问题处理
问题1:启动容器后,客户端访问服务时,会直接跳过firewalld规则,可以直接telnet容器端口问题2:容器访问宿主机端口需要单个开启端口规则,这里可以直接设置对宿主机容器开启权限直接执行以下命令即可EN_INTERFICE=`ifconfig |grep -E '^en'|awk -F":" '{print $1}'`cat>/etc/docker/daemon.json <<-EOF{"iptables": false}EOFcat>>/etc/s原创 2021-11-29 11:56:45 · 2009 阅读 · 1 评论 -
centos7 Kubeadm安装配置K8S 及Dashboard外部服务
centos7 Kubeadm安装配置K8S环境:Kubernetes Master节点:192.168.0.47Kubernetes node1节点:192.168.0.33Kubernetes node2节点:192.168.0.37Docker私有库节点:192.168.0.591、所有节点,HOST及防火墙设置#添加hosts解析;cat >/etc/hosts<<EOF127.0.0.1 localhost localhost.localdomain192.原创 2021-06-16 17:57:46 · 1278 阅读 · 0 评论 -
centos7 Harbor仓库安装配置及镜像pull/push
docker 仓库harbor安装配置一、安装Docker-Compose快速编排工具wget -c https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64mv docker-compose-Linux-x86_64 /usr/local/bin/docker-composechmod a+x /usr/local/bin/docker-composeln -s /usr/loca原创 2021-06-09 12:30:33 · 980 阅读 · 0 评论 -
源码 docker 及docker-compose
dockerdocker源码下载[root@localhost ~]# cd /usr/local/[root@localhost local]# wget -c http://mirrors.163.com/docker-ce/linux/static/stable/x86_64/docker-20.10.6.tgz解压[root@localhost local]# tar -xf docker-20.10.6.tgz [root@localhost local]# useradd -s /原创 2021-05-24 18:36:30 · 1168 阅读 · 0 评论 -
docker 容器 IP 持久化 duration.py
pipe分配容器IP后,随着容器的重启而丢失,需要再次配置才行。故现使用python-docker来持久化IP,即duration.py脚本安装Docker-py程序#pip install docker-py或[root@localhost data]# yum install python-docker* -y#安装桥接扩展包;[root@localhost data]# yum install bridge-utils -y下载docker-static-ip脚本;[root@l原创 2021-05-15 13:35:50 · 247 阅读 · 1 评论 -
Docker中文乱码
个人笔记,不喜请绕路!locale 命令来查看有哪些语言支持[root@0ca5b90999e6 soft]# locale -a|grep utf8en_AG.utf8en_AU.utf8en_BW.utf8en_CA.utf8en_DK.utf8en_GB.utf8en_HK.utf8en_IE.utf8en_IN.utf8en_NG.utf8en_NZ.utf8en_PH.utf8en_SG.utf8en_US.utf8en_ZA.utf8en_ZM.utf8en原创 2021-01-30 11:10:27 · 297 阅读 · 1 评论 -
Docker 实例增加端口映射
进入容器目录修改两个文件即可,修改前可以先状态docker,systemctl stop dockerhostconfig.json "PortBindings": { "22/tcp": [ { "HostIp": "", "HostPort": "3422" } ], 这里有个,逗号 "80/tcp": [ 宿原创 2021-01-29 16:44:10 · 474 阅读 · 0 评论 -
Docker 活动容器实例 增加目录映射 -v
添加 /data/soft:/data/soft 目录映射1、在容器目录下下载sz config.v2.json、hostconfig.json两个文件,修改它们cd /var/lib/docker/containers/7c3d7013f94801666841f55165646d414b17792de0c3890a4e7b98693a8a2218config.v2.json "AutoRemove": false, "Binds": [ "/etc/init.d/Do原创 2021-01-29 16:33:24 · 2033 阅读 · 1 评论 -
centos7 基于docker的Gitlab迁移(超详细)
环境:旧服务器:192.168.0.231新服务器:192.168.0.31。原创 2020-11-13 17:25:46 · 1597 阅读 · 0 评论 -
centos7 docker磁盘配额、CPU、内存设置及升级
一、环境:[root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core)[root@localhost ~]# uname -r3.10.0-1062.el7.x86_64[root@localhost ~]# ifconfig br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.原创 2020-08-16 22:31:19 · 1634 阅读 · 0 评论 -
构建docker企业私有仓库及Harbor实战
环境:一台正常的docker服务器一、pull仓库软件 - registry[root@localhost ~]# docker pull docker.io/registryUsing default tag: latestTrying to pull repository docker.io/library/registry ... latest: Pulling from docker.io/library/registrycbdbe7a5bc2a: Pull complete 471原创 2020-08-13 19:11:09 · 301 阅读 · 0 评论 -
docker 配置docker0内外网互联
说明:正常情况下在docker0下的容器IP与局域名其他机器隔绝,需要做端口映射来使用容器中的资源,那么有没有一种方法在不使用br0桥接模式下,使用docker0默认方式使局域网直接访问容器呢?请见下面过程1、配置路由,将至172网段的数据路由至docker宿主机2、宿主机开启转发功能添加最下面一行[root@localhost ~]# cat /etc/sysctl.conf # sysctl settings are defined through files in# /usr/lib/原创 2020-08-11 18:54:23 · 949 阅读 · 0 评论 -
centos7 docker配置桥接,与容器网络互联
环境:[root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core)[root@localhost ~]# uname -r3.10.0-1062.el7.x86_64[root@localhost ~]# ifconfig ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168原创 2020-08-07 12:34:16 · 984 阅读 · 0 评论 -
centos7 keepalived lvs 集群案例
环境:[root@0f34df37cdaf keepalived]# cat /etc/redhat-release CentOS Linux release 7.8.2003 (Core)DIP(lvs+keepalived): 172.17.0.5 Vip : 172.17.0.100 SIP1(nginx服务器): 172.17.0.3 lo:1 172.17.0.100 SIP2(nginx服务器): 172.17.0.4 lo:1 172.17.0.100真实服务器配置-原创 2020-08-05 18:29:22 · 210 阅读 · 0 评论 -
Centos7安装配置LVS-DR
LVS DR原理(路由直连):用户请求LVS上的VIP,在LVS中修改报文中的MAC地址为真实服务器的MAC地址,不改源IP与目标IP,源IP为用户IP不变,然后LVS将报文给RS服务器,RS回返时,从真实网关走数据,不再经过LVS环境:VIP: 172.17.0.100DIP: 172.17.0.5RIP: 172.17.0.2RIP: 172.17.0.3端口: 80后端服务: NGINX安装配置安装LVS[root@0f34df37cdaf ansible]# yum原创 2020-08-05 12:09:41 · 1020 阅读 · 0 评论 -
Docker 镜像制作
一、Alpline base镜像原创 2020-08-03 12:14:26 · 1506 阅读 · 1 评论