Laradock 如何自訂義 port 端口映射

首先,開啟

vim docker-compose.yml

尋找 Workspace 設定

### Workspace Utilities ##################################
    workspace:
      build:
        context: ./workspace
        args:
        ....
        
      volumes:
        - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
      extra_hosts:
        - "dockerhost:${DOCKER_HOST_IP}"
        - "abproject.oo:${DOCKER_HOST_IP}"
        - "aaproject.oo:${DOCKER_HOST_IP}"
      ports:
        - "${WORKSPACE_SSH_PORT}:22"
        - "9501:9501"
        - "9502:9502"
        - "1215:1215"
        - "7272:7272"  # 新增端口  host:container
        - "1236:1236"  # 新增端口  host:container
        - "55151:55151"  # 新增端口  host:container

儲存後

重新 build workspace 及 php-fpm

docker-compose build php-fpm workspace

啟動 laradock 後,查看端口

lsof -i -P -n | grep LISTEN