I am trying to get docker working on Ubuntu core using snappy to install. I am following this guide.

My VM is behind a proxy but using http_proxy env settings and sudo -E I seem to be able to get snappy to install docker:

(amd64)ubuntu@ubuntu-snappy:~$ snappy list -v
Name          Date       Version   Developer  
ubuntu-core   2016-02-25 16        ubuntu*    
docker        2016-04-18 canonical* 
generic-amd64 2016-02-25 1.4       canonical* 

My problems begin when trying to set the proxy for docker daemon. Firstly systemctl doesn't seem to be able to find docker.service:

(amd64)ubuntu@ubuntu-snappy:~$ sudo systemctl status docker
● docker.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

so setting the proxy as described here doesn't seem to have any effect.

Can anyone offer any advice?

(amd64)ubuntu@ubuntu-snappy:~$ cat /etc/os-release 
VERSION="15.04 (Vivid Vervet)"
PRETTY_NAME="Ubuntu 15.04"
(amd64)ubuntu@ubuntu-snappy:~$ uname -a
Linux ubuntu-snappy 3.19.0-51-generic #57-Ubuntu SMP Fri Feb 19 14:05:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I had the exactly the same issue with Ubuntu Core 16 (on raspberry pi 2).

Could you please try the following workaround?

Try to run docker with sudo snap run :

<my-user>@localhost:/home/~ sudo snap run docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: <my_user_name>
Login Succeeded

<my-user>@localhost:/home/~ sudo snap run docker ps
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS              PORTS               NAMES
7992d18555f1        zsoltm/postgresql-armhf   "/entrypoint.sh postg"   13 minutes ago      Up 13 minutes       5432/tcp            db

Root Cause:

The root cause of this issue seems to be that my user is not part of the docker group and i cannot use usermod to add my user to the docker group because it is Read-only FS (!!) :

<my-user>@localhost:~$ sudo usermod -aG docker <my-user>
usermod: /etc/group.1612: Read-only file system
usermod: cannot lock /etc/group; try again later.

Probably docker isn't running yet (for some reason).
You can try starting docker with sudo snappy activate docker due to how snappy works.

  • It looks like docker is running: (amd64)ubuntu@ubuntu-snappy:~$ sudo snappy service status docker Snap Service State docker docker-daemon enabled; loaded; active (running) – Freefall Apr 20 '16 at 13:01

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.