Future of building on docker?

Snapcraft 5.x requires the base to be specified and doesn’t allow it to be core. But when I set core18, it requires multipass for the build. That obviously won’t work in docker, but in certain build environments (such as running the build on kubernetes) there isn’t really a choice. What are our options going forward? For the time being, my build still works in the snapcore image. Is multipass required only when the base is different from the running Ubuntu version?

You can also use LXD in this situation, but yes you need to use the same base image version of ubuntu as the base you specify in your snapcraft.yaml. There is an explanation of how to do this for core18 in the docs: https://snapcraft.io/docs/build-on-docker

Thanks. So if I understand correctly, updating to snapcraft 5.x (in our case) entails adding base: core18 and building a docker image that supports core18? Or is it expected that the snapcore image will eventually get updated anyway?

You will need to build your own docker image as per the documentation I linked to

1 Like