请问docker部署不能修改端口号吗?
#144
-
修改文件源链接:https://github.com/FASUZO/ServerStatus-Rust 部署命令: wget --no-check-certificate -qO docker-compose.yml 'https://raw.githubusercontent.com/fasuzo/ServerStatus-Rust/master/docker-compose.yml'
wget --no-check-certificate -qO config.toml 'https://raw.githubusercontent.com/fasuzo/ServerStatus-Rust/master/config.toml'
touch stats.json
docker-compose up -d |
Beta Was this translation helpful? Give feedback.
Answered by
zdz
Feb 4, 2023
Replies: 1 comment 1 reply
-
config.toml 文件的端口 8080 不用改 version: "3"
services:
stat_server:
image: idoge/stat_server:latest
container_name: stat_server
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- ./config.toml:/config.toml
- ./stats.json:/stats.json
ports:
- 10006:8080
- 10106:9394
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
FASUZO
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
config.toml 文件的端口 8080 不用改
10006:8080
第一个是主机外面要使用的端口,第二个是容器里面端口