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

相关文章:

  • 2021-10-19
  • 2021-07-15
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2021-05-19
  • 2021-08-03
  • 2021-08-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-31
  • 2021-04-21
  • 2022-02-16
  • 2022-12-23
相关资源
相似解决方案