Use snapd like a container?

Using VirtualBox requires

  1. Installing VirtualBox (and changing some settings)
  2. Installing distro in the old way (inside VirtualBox)
  3. Now you have a distro inside your main distro

Is there a way where

  1. You install something like VirtualBox or Docker
  2. You install a deb package inside it in the old way (using apt or gdebi)
  3. You get a snap package in your main distro (not snap in a distro in a distro) ?

Sorry if it is weird.

If I understand correctly you want to expose certain classic applications installed in a VM or container to the host system as a snap app?

What I am trying to say

  1. Open host distro
  2. Open a VM with GUI
  3. Install FooBar using Software Center or do sudo apt install FooBar inside VM and close VM. You cannot change anything else inside VM.
  4. Do create-snap-from-vm --source=MyVm or something like this inside host. It will find the changes made to VM while installing FooBar
  5. Unnecessary parts of VM are removed, only necessary parts are saved. Install new packages inside VM if needed
  6. I get a real FooBar snap package (for host) which was previously a VM (inside host), not something that is treated like a snap
  7. (Bonus but not important) Upload the FooBar snap package to snap store

that’s essentially what you do with snapcraft, isn’t it?


Thanks for letting me know this.

I am a hobbyist and I read a poorly written blog post about making snaps. It was not clear to me what the post was trying to say. I cant find it now because I dont keep history.

I will try googling a little bit more in the future before creating a discussion. This looks good.

1 Like