Docker 下开发安装hyperf
Docker 下开发hyperf
# docker run -v /tmp/skeleton:/hyperf-skeleton -p 9501:9501 -it --entrypoint /bin/sh basecar/hyperf-developers:latest
# 下载并运行 hyperf/hyperf 镜像,并将镜像内的项目目录绑定到宿主机的 /tmp/skeleton 目录
docker run -v /tmp/skeleton:/hyperf-skeleton -p 9501:9501 -it --entrypoint /bin/sh hyperf/hyperf:latest
# 镜像容器运行后,在容器内安装 Composer
wget https://mirrors.aliyun.com/composer/composer.phar
chmod u+x composer.phar
mv composer.phar /usr/local/bin/composer
# 将 Composer 镜像设置为阿里云镜像,加速国内下载速度
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer
# 通过 Composer 安装 hyperf/hyperf-skeleton 项目
composer create-project hyperf/hyperf-skeleton
# 进入安装好的 Hyperf 项目目录
cd hyperf-skeleton
# 启动 Hyperf
php bin/hyperf.php start
composer中国源
阿里云 https://mirrors.aliyun.com/composer/
laravel-china http://packagist.laravel-china.org/
cnpkg https://php.cnpkg.org/
腾讯的: https://mirrors.cloud.tencent.com/composer/
华为的: https://mirrors.huaweicloud.com/repository/php/
交通大学:https://packagist.mirrors.sjtug.sjtu.edu.cn
本文来自博客园,作者:cnlihao,转载请注明原文链接:https://www.cnblogs.com/cnlihao/p/11815215.html