2

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 1.6.2.005 canonical* 
generic-amd64 2016-02-25 1.4       canonical* 
(amd64)ubuntu@ubuntu-snappy:~$

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)
(amd64)ubuntu@ubuntu-snappy:~$ 

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 
NAME="Ubuntu"
VERSION="15.04 (Vivid Vervet)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 15.04"
VERSION_ID="15.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
(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
(amd64)ubuntu@ubuntu-snappy:~$ 
1

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>
Password: 
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.
0

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.