How to run snappy from inside Docker - systemd issues?

Bug #1581188 reported by Neal McBurnett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Won't Fix
Undecided
Unassigned

Bug Description

I'm trying to run snappy via the official Ubuntu Xenial docker image:

 docker run -it ubuntu # Xenial: Docker Image ID: 44776f55294a

That does a wonderful job of downloading any necessary images or updates, and giving me an interactive prompt inside a fresh new Xenial container.

Inside that container, I run

 apt install -y snapd
 snap list

But I get "error: cannot list snaps: cannot communicate with server: Get http://localhost/v2/snaps?sources=local"

This is presumably because the snap daemon isn't running or can't be found. Trying to find out why that might be leads to a maze of twisty passages filled with graffiti documenting the fights between systemd, docker and runC:

  Systemd vs. Docker [LWN.net]
   https://lwn.net/Articles/676831/

Motivation: I want to play with snaps, but haven't upgraded to Xenial yet. Docker is generally an easy way to try out features of a new version of Ubuntu.

I'm using Docker version 1.11.1, build 5604cbe running on Ubuntu Trusty 14.04.

At a minimum, we need a better error message, and a description of either how to get it working, or why this is just a bad idea, along with other options for doing all things snappy for folks that like Docker.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1581188] [NEW] How to run snappy from inside Docker - systemd issues?

I don't believe snaps will work inside a Docker container, at least not
for a while, but let's definitely get a cleaner error message in place.

Mark

Revision history for this message
Claudio André (claudioandre.br) wrote :

Another use case (motivation): test snaps on different distros (and Ubuntu versions) inside a CI/CD process.
- E.g.: if snaps can work inside Docker, I can try 'my' snap against a few distros (including the new Fedora landing) using Travis.

Revision history for this message
John Lenton (chipaca) wrote :

We don't have plans (for now) to do the work that could let snapd work inside docker. We don't even have plans (again, for now) to do the work that could let snapd work without systemd, which is a large part (but not all) of the docker work.

Changed in snappy:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.