I installed Docker 17.12.0-ce
via Nix in Ubuntu (Linux uplink 4.13.0-36-generic #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
), but every time I try to execute any Docker command, it keeps telling me: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
.
This is what I did:
$ nix-env --install --prebuilt-only docker-17.12.0-ce
$ nix-env -q
docker-17.12.0-ce
go-1.9.4
hugo-0.32.2
kotlin-1.2.21
nix-1.11.16
nodejs-8.9.4
openjdk-8u172b02
openjdk-9.0.4-b11
$ docker version
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.4
Git commit: 486a48d2701493bb65385788a291e36febb44ec1
Built: Thu Feb 15 13:56:40 2018
OS/Arch: linux/amd64
Experimental: false
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
$ docker ps -a
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I read the Post-installation steps for Linux (even though this shouldn't apply, to some extent, to Nix packages) and went ahead and added a docker
user and all that stuff...but still, nothing.
I know there are tons of answers for this question — and I've tried several "solutions"...but no luck yet.