0

I am a complete beginner and I seem to have skipped some important section in the docs, but let's say I have these files:

$ tree
.
├── snap
│   └── snapcraft.yaml
└── yolo
    └── test.txt

and the contents of the snapcraft.yaml are:

name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core18 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
  This is my-snap's description. You have a paragraph or two to tell the
  most important story about your snap. Keep it under 100 words though,
  we live in tweetspace and your description wants to look good in the snap
  store.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots

parts:
  my-part:
    # See 'snapcraft plugins'
    plugin: dump
    source: yolo

Then I would expect to run the command snapcraft in the root of these two directories and get a snap file my-snap-name_0.1_amd64.snap which I can then proceed to inspect with unsquashfs -l *.snap and I should see the file test.txt somewhere in it.

Should I not? What do I not understand?

1 Answer 1

0

Found the answer: Because I used the multipass plugin. Unknown why, but it doesn't work. What works is when I switch to LXD:

sudo snap install lxd
sudo lxd init --auto
snapcraft --use-lxd
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .