gpt4 book ai didi

docker - 无法在Docker上连接localhost Evebox

转载 作者:行者123 更新时间:2023-12-03 02:28:26 25 4
gpt4 key购买 nike

我使用docker-compose启动Evebox,但无法在localhost:5636上连接它。

我的docker-compose文件的一部分:


evebox:
image: jasonish/evebox:master
volumes:
- /var/log/suricata:/var/log/suricata
links:
- elasticsearch
networks:
- elk
ports:
- 5636:5636
command: --input /var/log/suricata/eve.json -e http://192.168.32.15:9200


elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.1
container_name: elasticsearch8
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "http.cors.enabled:true"
- "http.cors.allow-origin:\"*\""
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
networks:
- elk
restart: always
networks:
elk:


我无法在localhost:5636上连接Evebox,但是当我使用 docker exec -it 2c50f02b7385 /bin/sh进入docker容器时可以连接它。

我该如何解决?

最佳答案

尝试添加:

expose:
-"5636"

在您的配置中,就像这样!
evebox:
image: jasonish/evebox:master
volumes:
- /var/log/suricata:/var/log/suricata
links:
- elasticsearch
networks:
- elk
ports:
- 5636:5636
expose:
- "5636"
command: --input /var/log/suricata/eve.json -e http://192.168.32.15:9200

关于docker - 无法在Docker上连接localhost Evebox,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60518280/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com