Skip to content

请问docker部署不能修改端口号吗? #144

Answered by zdz
FASUZO asked this question in Q&A
Discussion options

You must be logged in to vote

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

10006:8080 第一个是主机外面要使用的端口,第二个是容器里面端口

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@FASUZO
Comment options

Answer selected by FASUZO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants