cd /usr/local/docker/ mkdir rancher && cd rancher/
cat > docker-compose.yaml << EOF version: '3' services: rancher: image: 'rancher/rancher:v2.4.4' privileged: true restart: always container_name: rancher volumes: - ./data:/var/lib/rancher - /etc/resolved.conf:/etc/resolved.conf network_mode: host environment: - TZ=Asia/Shanghai EOF
docker logs -f rancher
https://ip 首次登陆直接调转至设置设置密码界面 账户为admin