求乌班图一键安装配置启动docker命令

查看 71|回复 3
作者:令狐冲   
榆木   
if [[ $(command -v docker) ]];
then
        echo "docker is installed.."
else
        echo "Let's get docker"
        curl -fsSL https://get.docker.com -o get-docker.sh
        bash get-docker.sh
fi
if [ -L /etc/systemd/system/multi-user.target.wants/docker.service ]
then
    echo "Docker Enabled"
else
    echo "Docker Not Enable"
    systemctl enable docker
    systemctl daemon-reload
fi
docker_status=`systemctl status docker | grep "Active" | awk -F "[: ]+" '{print $3}'`
if [ "$docker_status" == "inactive" ]; then
    systemctl start docker
fi
朝花夕拾   
官方不是自带吗
worigin   
https://www.runoob.com/docker/ubuntu-docker-install.html
您需要登录后才可以回帖 登录 | 立即注册

返回顶部