1、环境:
idve@ubuntu:~$ uname -a
Linux ubuntu 5.0.0-27-generic #28~18.04.1-Ubuntu SMP Thu Aug 22 03:00:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
2、安装docker
sudo apt install docker.io
3、安装的docker版本
idve@ubuntu:~$ docker -v
Docker version 18.09.7, build 2d0083d
4、启动docker:
systemctl start docker.service
报错
Failed to start docker.service: Unit docker.service is masked.
解决方案:
systemctl unmask docker.service
systemctl unmask docker.socket
systemctl start docker.service
5、加入开机启动
systemctl enable docker.service
6、启动docker
systemctl start docker.service