QQ扫一扫联系
Docker要求CentOS系统的内核版本高于3.10
uname -r #通过uname -r 命令查看你当前的内核版本
sudo yum update
如果你的操作系统没有安装过Docker , 就不需要执行卸载命令。
sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
sudo yum install -y yum-utils
sudo yum-config-manager \
—add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo docker run hello-world
docker run —name hyperf \
-v /workspace/skeleton:/data/project \
-w /data/project \
-p 9501:9501 -it \
—privileged -u root \
—entrypoint /bin/sh \
hyperf/hyperf:8.1-alpine-v3.18-swoole
cd /data/project
composer create-project hyperf/hyperf-skeleton
cd hyperf-skeleton
php bin/hyperf.php start