- 安装虚拟机,破解
- 导入虚拟机镜像
- 创建共享文件目录
- 修改虚拟网络配置
vi /etc/sysconfig/network-scripts/ifcfg-ens32
IPADDR ip段.100
GATEWAY ip段.2
- 重启网卡
service network restart
- 下载docker编排文件
cd /www
git clone https://github.com/dinofei/wfw-docker.git docker
- 修改docker-compose.yml的挂在目录为本地创建的目录名称
- 安装容器
docker-compose up -d
如果出现IPv4 forwarding is disabled. Networking will not work:vi /etc/sysctl.conf
net.ipv4.ip_forward=1
service network restart
- 进入容器下载框架,启动
docker exec -it php74 sh
composer create-project hyperf/hyperf-skeleton
php hyperf-skeleton/bin/hyperf.php start
- 在宿主机启动框架
docker exec -it php74 sh -c "php hyperf-skeleton/bin/hyperf.php start"
容器:
php 7.4.11:
ext: swoole4.5 redis5.0 amqp
rabbitmq3.8
管理地址:http:ip:15762
账户/密码:guest/guest
zookeeper
kafka
kafka-manager
其他:
素材:
架构分层
代码规范
docker-compose up -d
docker-compose down
docker exec -it container_name sh
docker exec -it container_name bash
docker exec -it container_name sh -c "your_shell_command"