I am bundling ubuntu-core following the steps from https://tutorials.ubuntu.com/tutorial/create-your-own-core-image#4. Is there a way to pre install a local snap file at the image. I have customized snaps that I don’t want to publish.
Thanks!
I am bundling ubuntu-core following the steps from https://tutorials.ubuntu.com/tutorial/create-your-own-core-image#4. Is there a way to pre install a local snap file at the image. I have customized snaps that I don’t want to publish.
Thanks!
You can pass local snaps using --extra-snaps with ubuntu-image.
Eg.
ubuntu-image --image-size 4G \
--extra-snaps localhack*.snap \
model
Thanks @chihchun, that works smooth! Is there a way to fetch the keys from a snap account or import/export keys locally? I have an ephemeral build machine and don’t want to create and register a new key on each build.
Let me answer this one myself :). There is a way to import/export keys:
# import
gpg --homedir=.snap/gnupg --passphrase mypassword --allow-secret-key-import --import /tmp/my.key
# export
gpg --homedir=.snap/gnupg --export-secret-keys