systemctl enable docker
This will also fix the problem that docker is not running:
- Linux - Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Usually this problem occurs when we install docker and we do not add docker service to systemctl. As the result docker won't start when we reboot our operating system.