Bases¶
Snaps declare a base in their snapcraft.yaml file. The base defines the feature set used by Snapcraft, the snapcraft.yaml schema, the environment where the snap is built, and which base snap is used at runtime.
Base snaps¶
There are six supported base snaps:
Name |
Description |
Latest snapcraft track with support |
---|---|---|
built from Ubuntu 24.04 LTS |
8.x |
|
built from Ubuntu 22.04 LTS |
8.x |
|
built from Ubuntu 20.04 LTS |
8.x |
|
built from Ubuntu 18.04 ESM |
7.x |
|
built from Ubuntu 16.04 ESM, not to be confused with core16 (see below) |
4.x |
|
an empty base that’s useful with fully statically linked snaps and when testing |
8.x |
Older releases of core were occasionally referred to as core 16, but core
and core16
are two distinct packages.
Warning
core16 is not a supported base. With no stable release, its beta and candidate releases are classed as experimental.
See Snapcraft and ESM for details bases built from ESM releases.
base
¶
The base
keyword in a snapcraft.yaml
file:
defines the feature set used by Snapcraft
the
snapcraft.yaml
schemathe environment where the snap is built if
build-base
is not definedand which base snap is used at runtime
base
must be defined except for base, snapd, and kernel snaps.
base
must be a supported base.
build-base
¶
The build-base
keyword defines the environment where the snap will be
built.
build-base
can only be defined for the following scenarios:
Bare base snaps¶
build-base
must be a supported base when
base: bare
is defined.
Devel builds¶
build-base
must be devel
must be defined when base
is unstable.
Unstable means that the base snap has not been released to the stable
channel.
Snaps with a devel
build base must have a grade
of devel
and cannot
be promoted to stable
or candidate
channels.
Kernel snaps¶
build-base
must be a supported base when
type: kernel
is defined.
See How to build a kernel snap for details on how to
use build-base
for kernel snaps.