1

From a Ubuntu shell I tried to create a now docker image with the following command:

sudo debootstrap trusty trusty_a > /dev/null
sudo tar -C trusty_a -c . | sudo docker import - trusty_a
docker run trusty_a cat /etc/lsb-release

I then got a 'docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?' error.

I tried the following:

sudo service docker start

and found:

start: Job is already running: docker

I am unsure then why I cant start the new image?

2

The problem was I hadn't added myself to the docker group so 'docker run ...' failed.

see https://docs.docker.com/engine/installation/linux/ubuntulinux/ and add yourself to a docker group using this:

sudo groupadd docker
sudo usermod -aG docker $USER
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.