hyperf2 docker开发
yum update -y
yum remove docker docker-common docker-selinux docker-engine
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce
systemctl start docker
systemctl enable docker
docker version
Win10 安装docker
https://desktop.docker.com/win/stable/Docker%20Desktop%20Installer.exe
下载源代码
git clone git@gitee.com:hello/caiss-front.git
下载运行环境的镜像
docker pull hyperf/hyperf:7.4-alpine-v3.11-swoole
启动容器
docker rm -f hyperf
Linux系统是
docker run -it –volume=/data/wwwroot/caiss-front:/hyperf-skeleton –publish=22222:9501 –name=”hyperf” –entrypoint /bin/sh hyperf/hyperf:7.4-alpine-v3.11-swoole
Windows10系统
鲸鱼的Settings的Resources的FileSharing要添加宿主机目录,比如开放F磁盘
docker run -it –volume=F:/caiss-front:/hyperf-skeleton –publish=22222:9501 –name=”hyperf” –entrypoint /bin/sh hyperf/hyperf:7.4-alpine-v3.11-swoole
exit
开始编码
docker start hyperf
docker exec -ti hyperf /bin/sh
cd /hyperf-skeleton/
任意操作,比如
composer install
composer start
exit