Sign inSign up

ipuppy/hyperf

By ipuppy

•Updated over 5 years ago

swoole & php7.4.9

Image
0

881

ipuppy/hyperf repository overview

镜像基于: bitnami/php-fpm/7.4.19-prod⁠

⁠命令

⁠创建

docker run --name ihyperf
-v /Users/puppy/dev/php:/app
-p 9501:9501
-p 9300:9300
-p 2022:22
--restart=always
--cap-add=NET_ADMIN
-d
ipuppy/hyperf:latest

⁠bitnami/php-fpm:7.4-prod

⁠运行

docker exec -it ihyperf /bin/bash

⁠安装的软件

⁠前提
- apt-get update
- apt-get install vim
- 修改镜像地址
    vim etc/apt/sources.list
    内容:
        deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
        deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
        deb http://mirrors.aliyun.com/debian-security buster/updates main
        deb-src http://mirrors.aliyun.com/debian-security buster/updates main
        deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
        deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
        deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
        deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
- 安装 autoconf
apt-get update && apt-get install autoconf
- build-essential
    apt install build-essential
    apt install gcc
⁠swoole
- pecl install swoole
    Build process completed successfully
    Installing '/opt/bitnami/php/lib/php/extensions/swoole.so'
    Installing '/opt/bitnami/php/include/php/ext/swoole/config.h'
    install ok: channel://pecl.php.net/swoole-4.6.4
    configuration option "php_ini" is not set to php.ini location
    You should add "extension=swoole.so" to php.ini
- php.ini
⁠安装 yasd 扩展(DEBUG)
- https://github.com/swoole/yasd
⁠安装 mongodb 扩展
⁠安装 sudo
- apt-get install sudo -y
⁠安装 ssh
- https://github.com/swoole/swoole-src/issues/3421
- https://github.com/swoole/yasd/issues/95
- https://www.cnblogs.com/yjken/p/8435018.html
apt-get install openssh-client
apt-get install openssh-server
- 启动
    sudo service ssh start
- 开机启动
    update-rc.d ssh enable
- 启用 ssh 登录
    在/etc/ssh/sshd_config最后中加入
    PermitRootLogin yes #允许root登录
    PermitEmptyPasswords no #不允许空密码登录
    PasswordAuthentication yes # 设置是否使用口令验证。
⁠注意
- ssh 登录后的,需要使用 /opt/bitnami/php/bin/php 的命令
- 密码: 222222
⁠DEBUG 配置
- 参考 
    - https://github.com/swoole/yasd/issues/59

Tag summary

Content type

Image

Digest

Size

468.5 MB

Last updated

over 5 years ago

docker pull ipuppy/hyperf