Docker 安装完启动时提示 Failed to start docker.service: Unit docker.service is masked.

Ubutntu 安装完 docker 后,执行

sudo service docker start

提示

Failed to start docker.service: Unit docker.service is masked.

解决方案:

执行如下三条指令

systemctl unmask docker.service
systemctl unmask docker.socket
systemctl start docker.service