Skip to content

Run devpod from within flatpak #33

@buergi

Description

@buergi

This is not a real bug report but rather a feature request. I'd love this extension to work when vscodium is used as a flatpak.
It took me a while but I found a way to get it working.
First I thought it would be enough to just use flatpak-spawn --host devpod as devpod path in the extension's settings.
However, running the ssh command to install the vscode server in the container failed, as devpod always installed itself as ProxyCommand in .ssh/config but /usr/local/bin/devpod was not available in the flatpak environment. Unfortunately, everything under /usr can't be bind-mounted into a flatpak.

So my working solutions is

  • put devpod in another location such as /opt/devpod/devpod
  • changed the devpod path in the extension's settings accordingly
  • To make docker available in the flatpak add this simple wrapper script under /opt/devpod/docker-wrapper
#!/bin/bash

if command -v flatpak-spawn >/dev/null 2>&1; then
    exec flatpak-spawn --host docker "$@"
else
    exec docker "$@"
fi
  • Finally add a devpod provider devpod provider add --name docker -o DOCKER_PATH=/opt/devpod/docker-wrapper docker or if you already have one change its DOCKER_PATH option
devpod provider set-options docker --option DOCKER_PATH=/opt/devpod/docker-wrapper
  • not directly related, but I had to attach the corresponding SELinux policy type label to the host directory chcon -Rt svirt_sandbox_file_t ~/dev/OrcaSlicer

I'm not sure if this can somehow be integrated in this extension, so that it is configured automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions