Docker snap from core20 base

Hi there,

I got an error when I used --snap docker=latest/stable to create an image:

error: cannot add snap “docker” without also adding its base “core18” explicitly

Is there a docker snap built on core20? From docker’s snap info, I don’t see if it was built on which core, I guess it may not be the case since the snap should be installed on core18 or core20. Can you please shed some lights on where the potential root cause will be?

Thanks,
Hao

I suspect that when generating an image you need to explicitly include core18 like the error says you must. Add it as an extra --snap before the docker line.

1 Like

snap info can show you the base of a snap if you use --verbose

alan@robot:~$ snap info --verbose docker | grep ^base
base:    core18
1 Like

Got it, it shows core18 for the docker snap. Then we will need another docker snap built on core20 in snap store?

no, you can run a core20 image with core18 included in addition to the core20 bits.

2 Likes

Hi @ogra, do you know if we’ve got any plan for docker on core20? Thanks. :slight_smile:

that would be a question for @tianon i think …

but as @daniel mentioned, just seed the core18 snap in your image before seeding docker in the model assertion and all will be fine … you can mix multiple bases in UC images just fine, this is what they were designed for …

i.e. take a look at that model assertion were i mix and mesh many different bases and snaps:

https://people.canonical.com/~ogra/UC20/pi-mediacenter-appliance/mediacenter.model

3 Likes

See https://github.com/docker-snap/docker-snap/issues/15 for where that was discussed previously – mainly, the biggest blocker now is that we’d lose support for i386 by doing so (upgrading to core18 was the compromise, since we were previously on the implied core16 base).

1 Like