Using Docker in a Snap

Dustin Kirkland kirkland at canonical.com
Fri Jul 17 02:21:41 UTC 2015


On Thu, Jul 16, 2015 at 3:11 PM, Jamie Strandboge <jamie at canonical.com> wrote:
> On 07/16/2015 02:12 PM, Dustin Kirkland wrote:
>> I'm trying, and failing, to use Docker in a snap.
>>
>> My syslog is here: http://paste.ubuntu.com/11889030/
>>
>> Where you can see I've tried a couple of different things.
>>
>> The key error seems to be:
>>
>> Jul 15 22:20:10 localhost ubuntu-core-launcher[1455]:
>> /apps/mprime.sideload/28.5-2/mprime.sh: 3:
>> /apps/mprime.sideload/28.5-2/mprime.sh: /apps/bin/docker: Operation
>> not permitted
>>
>> I find it odd that I can run that command /apps/bin/docker launch
>> containers just fine, as the ubuntu user or the root user.  But it's
>> not working upon snap installation.  I can't see anything obviously
>> wrong from an AppArmor perspective either.
>>
>> You can find my source code at lp:~kirkland/+junk/mprime.
>>
>
> Does your snap depend on the docker framework? Does 'caps' in your package.yaml
> specify 'docker_client'. If so, then rather than using /apps/bin/docker, you
> would instead use /apps/docker/current/bin/docker. See the owncloud snap for
> details: https://launchpad.net/~snappy-dev/snappy-hub/owncloud

Yes, and yes.  Depends on the docker framework, and has the
caps/docker_client bit.  And I'm using
/apps/docker/current/bin/docker.

http://bazaar.launchpad.net/~kirkland/+junk/mprime/view/head:/snap/mprime/meta/package.yaml

Same error.

Jul 17 02:13:36 localhost ubuntu-core-launcher[958]:
/apps/mprime.sideload/28.5-6/mprime.sh: 4:
/apps/mprime.sideload/28.5-6/mprime.sh:
/apps/docker/current/bin/docker: Operation not permitted

Possibly ownership of some file or directory that docker needs to write to?

Dustin



More information about the snappy-app-devel mailing list