Error: unknown flag: –restart

升级docker版本

  1. 卸载旧版
yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

2. 设置

yum install -y yum-utils
yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

3. 安装新版

yum install docker-ce docker-ce-cli containerd.io

4. 设置启动

systemctl enable docker && systemctl start docker

5. 启动你的容器