83 Star 628 Fork 233

yeszao / dnmp

 / 详情

配置swoole后外部无法使用

Backlog
Opened this issue  
2020-01-02 11:27

我在php配置中添加ports: - "9501:9501",如果进入php容器内启动一个swoole的http服务,在外部使用telnet是可以连接的,但是如果我在外部启动,并在外部telnet连接就会被拒绝,显示Connection closed by foreign host

Comments (3)

xppppy created任务

是不是还需要一些额外的配置?

大佬指点一下貌似都不行

  easyswoole:
    build:
      context: ./services/php
      args:
        PHP_VERSION: php:${PHP_VERSION}-fpm-alpine
        CONTAINER_PACKAGE_URL: ${CONTAINER_PACKAGE_URL}
        PHP_EXTENSIONS: ${PHP_EXTENSIONS_SWOOLE}
        TZ: "$TZ"
    container_name: easyswoole
    ports:
      - "9501:9501"
    command: php easyswoole start
    volumes:
      #- ${SOURCE_DIR}/easyswoole:/easyswoole   linix环境使用
      #- ${SOURCE_DIR}\easyswoole:/easyswoole   windows环境使用
      - ${SOURCE_DIR}\easyswoole:/easyswoole
      - ${PHP_PHP_CONF_FILE}:/usr/local/etc/php/php.ini:ro
      - ${PHP_FPM_CONF_FILE}:/usr/local/etc/php-fpm.d/www.conf:rw
      - ${PHP_LOG_DIR}:/var/log/php
      - ${DATA_DIR}/composer:/tmp/composer
    restart: always
    working_dir: /easyswoole
    cap_add:
      - SYS_PTRACE
    networks:
      - default

我使用easyswoole能跑通

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(4)
472016 yeszao 1578924945
Docker
1
https://gitee.com/yeszao/dnmp.git
git@gitee.com:yeszao/dnmp.git
yeszao
dnmp
dnmp

Search