V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  ztfot  ›  全部回复第 1 页 / 共 1 页
回复总数  20
1 天前
回复了 ztfot 创建的主题 Docker Docker 容器内访问宿主机的问题
@fmd12345 ufw 9100 ALLOW 172.18.0.2 就允许了这一个 IP , 之前没想到,算是曲线救国了 :)
1 天前
回复了 ztfot 创建的主题 Docker Docker 容器内访问宿主机的问题
1 天前
回复了 ztfot 创建的主题 Docker Docker 容器内访问宿主机的问题
问题依然还在
![]( https://media.kivvi.me:443/media/202405201108150.png)
关闭防火墙后就可以使用???
![]( https://media.kivvi.me:443/media/202405201116866.png)
有没有更好的解决方案? 或者我哪里配置错了?

prometheus 配置:
```
docker run -d -p 127.0.0.1:9090:9090 \
-v /storage/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml \
--add-host=host.docker.internal:host-gateway \
--restart=always \
--name=prometheus \
--net=prometheus-bridge \
--ip 172.18.0.2 \
prom/prometheus
```

node_exporter 配置:
```
version: '3.8'

services:
node_exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
command:
- '--path.rootfs=/host'
network_mode: host
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
```

网桥信息:
```
root@it7:~# docker inspect prometheus-bridge
[
{
"Name": "prometheus-bridge",
"Id": "9db3ba11ccefb523a85ef3713777c780c49f0bf64f6065dd7bbd0d77d45da612",
"Created": "2024-05-17T15:56:49.735352162+08:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.18.0.0/24",
"Gateway": "172.18.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"028e10760ce3a47680d4b9b0c7bce38ecfb7e8588be860d5523ab93dcbc8b5ae": {
"Name": "prometheus",
"EndpointID": "c5675e399cf1e0fe1e843a9995e31836ab21de23db25c8bfdd54ba9197d28405",
"MacAddress": "02:42:ac:12:00:02",
"IPv4Address": "172.18.0.2/24",
"IPv6Address": ""
},
"29b6830a07165ac45fb176e48a14b4b31e4f1925c9b580c4528c836a5978dd3c": {
"Name": "xxx",
"EndpointID": "52acddb87f3515af70c39d38784dbef7dd0506ce94881410cddfdbdea04bb6f5",
"MacAddress": "02:42:ac:12:00:04",
"IPv4Address": "172.18.0.4/24",
"IPv6Address": ""
},
"70edf1712821c9efd62dbb57f15f78329923409ac874157bc07b547535062478": {
"Name": "xxx",
"EndpointID": "dd32442417a928a22477c587dc9cecebb6162ee1b93b748310e57109f341ebca",
"MacAddress": "02:42:ac:12:00:03",
"IPv4Address": "172.18.0.3/24",
"IPv6Address": ""
},
"eddd3efc96103784a7a5e961b988d56503131eefdd934657532441edf75b15d7": {
"Name": "xxx",
"EndpointID": "255eb88cb2e8706383f4aabc4d7be8de7cc9916929ddb71480b541d4c4399a5e",
"MacAddress": "02:42:ac:12:00:05",
"IPv4Address": "172.18.0.5/24",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
```

docker 版本:
```
root@it7:~# docker version
Client: Docker Engine - Community
Version: 26.1.3
API version: 1.45
Go version: go1.21.10
Git commit: b72abbb
Built: Thu May 16 08:33:29 2024
OS/Arch: linux/amd64
Context: default

Server: Docker Engine - Community
Engine:
Version: 26.1.3
API version: 1.45 (minimum version 1.24)
Go version: go1.21.10
Git commit: 8e96db1
Built: Thu May 16 08:33:29 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.31
GitCommit: e377cd56a71523140ca6ae87e30244719194a521
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
root@it7:~#
```


@Etuloser
@fmd12345
@LoliconInside 普罗米修斯已经设置网桥很多东西都连在上面,设 host 会冲突
哎,主要是想兼容一下 PICGO, 可惜 PICGO 没有给自建图床的方案
22 天前
回复了 jlz52z 创建的主题 OpenAI GPTplus 变成 gpt3.5 了
是的,昨天和今天陆续出现了这些问题
@sjoal 电信要开启超级管理员模式关闭防火墙,你的那个测试网站会测试是否双向连通,但是有防火墙默认外面流量就进不来了, 我的情况是 IPV6 能访问别的网站,但是我这个公网 IP 外面访问不了
186 天前
回复了 core055 创建的主题 VPS 出 搬瓦工 The Plan V2
@core055 已加
186 天前
回复了 core055 创建的主题 VPS 出 搬瓦工 The Plan V2
186 天前
回复了 core055 创建的主题 VPS 出 搬瓦工 The Plan V2
诚心要
186 天前
回复了 core055 创建的主题 VPS 出 搬瓦工 The Plan V2
有需要能给个联系方式不?发个 TG 之类的
通过 DNS 记录?注册新域名注册记录是公开的,Google 可能会检查新的 DNS 记录并且爬取
猜测
2023-03-06 14:37:49 +08:00
回复了 FFatTiger 创建的主题 macOS 多个蓝牙设备连接, airpods 特别卡
一样,mm +mk +airpods max 也卡爆,不知道怎么解决😂
2022-12-22 14:14:27 +08:00
回复了 ztfot 创建的主题 VPS 搬瓦工,两个加起来 1000 出了 40G GIA, CMI 8 个月有效, 诚信交易
@billytom 45.78.19.33
2022-12-21 23:56:05 +08:00
回复了 ztfot 创建的主题 VPS 搬瓦工,两个加起来 1000 出了 40G GIA, CMI 8 个月有效, 诚信交易
@billytom 1G 带宽,速度看地区吧 CMI 的
2021-11-04 17:20:11 +08:00
回复了 ztfot 创建的主题 VPS 现在搬瓦工 CN2-GIA-E 也不行了吗,白天日常断流,坐标天津
转 gcp 不知道还能用多久
2021-07-28 17:46:21 +08:00
回复了 SiuRayyy 创建的主题 macOS 求助关于 macos 在移动硬盘上安装应用和蓝牙鼠标
我用雷电 4 硬盘盒配 parallels desktop 可以用的
Mac 下只有 QQ 没有 TIM (已寻找多年)
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   951 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 27ms · UTC 21:18 · PVG 05:18 · LAX 14:18 · JFK 17:18
Developed with CodeLauncher
♥ Do have faith in what you're doing.