镜像基于: 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
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
- 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
- https://github.com/swoole/yasd
- apt-get install sudo -y
- 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
- 参考
- https://github.com/swoole/yasd/issues/59
Content type
Image
Digest
Size
468.5 MB
Last updated
over 5 years ago
docker pull ipuppy/hyperf