Skip to content

Instantly share code, notes, and snippets.

@gwpl
Last active November 21, 2022 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwpl/fb30eddbe0b0624186b96ebdfc457d69 to your computer and use it in GitHub Desktop.
Save gwpl/fb30eddbe0b0624186b96ebdfc457d69 to your computer and use it in GitHub Desktop.
Isolating applications on desktop - Docker, Vagrant as a Desktop (or QubesOS and other options) for for better desktop security [Notes/Draft]

The goal of these notes is to plant idea that there are few alternatives to "just running apps directly on your computer".

If you don't pick any of mentioned options, please consider as bare minimum, making separate user for some apps, or some contexts (e.g. "me-work-emails", "me-work-coding", "me-work-graphics-design", "me-work-instant-messanger",...). However above solutions one may find more seamless.

Docker and Docker-Compose are DRY in spirit of "infrastructure as code" for Linux containers.

You specify your setup in Dockerfile (in case of composition of multiple dockers also docker-compose.yml ).

However! You can run all your apps in docker containers, therefore using docker as a desktop, minimizing their surface/access to absolute minimum required for them to run!

therefore

  • reducing attack surface
  • keeping your system cleaner (if apps require dependencies, they are contained in docker container)
  • DRY => Don't repeat Yourself => once you have configured docker setup on one machine, you can easily run app on other machines with docker

Warning!

Docker is not recommended as a security tool for process isolation, but it is easy to use and obviously provides some benefits.

Therefore, obviously using VMs (e.g. with Vagrant) or full solution like QubesOS is stronger setup, but using this docker setup is better then running apps without any isolation.

Learn more:

P.S. Above is similar to Snapcraft approach, that you may experience e.g. in Ubuntu.

P.P.S. "docker as a desktop" is technically incorrect play of words. "as a desktop" in sense of running all of your apps in docker, for such setup you usually want to use normal distro underneath. If you are interested in "docker on bare metal" => https://stackoverflow.com/q/20088835/544721 .

To make this short gist/note complete, I have to mention about

Qubes OS:

https://www.qubes-os.org/

that allows you to seamlessly run apps in different VMs, and Qubes OS, makes it convenient to use them, like they would run on one window manager / GUI! So it feels like one system, while you run multiple isolated underneath.

Allows great flexibility in isolating what has access to what, what is shared, what isolated, probably most secure pick!

Vagrant is DRY / "infra as code" for VMs, etc.

So you can specify your VM in Vagrantfile and run vagrant up to bulid it from script!

You use provider and provisioner, and for each you have multiple options.

(if you want to Q&A "What is the difference between a Vagrant Provider and a Vagrant Provisioner?")

Also environments can be packages into vagrant package format called "boxes":

To research:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment