Skip to content
This repository was archived by the owner on Sep 20, 2026. It is now read-only.

Set TMPDIR to $XDG_RUNTIME_DIR/app/com.visualstudio.code - #3

Merged
francoism90 merged 1 commit into
masterfrom
tmpdir-shared-with-host
Sep 10, 2026
Merged

francoism90 merged 1 commit into
masterfrom
tmpdir-shared-with-host

Conversation

@francoism90

Copy link
Copy Markdown
Owner

Summary

  • Set TMPDIR to $XDG_RUNTIME_DIR/app/${FLATPAK_ID:-com.visualstudio.code} when launching VS Code, so Node's os.tmpdir() (used by the devcontainers CLI) writes to a directory Flatpak actually shares with the host, instead of the sandbox-private /tmp.
  • Fixes devcontainers feature builds under Podman: the build context gets written under TMPDIR, then handed to podman-remote running on the host via host-spawn — which can't see the sandbox's private /tmp even with --filesystem=host (that permission doesn't cover /tmp; Flatpak always gives every app its own isolated tmpfs there).

Cherry-picked from flathub/com.visualstudio.code#606, which fixes flathub#605.

Test plan

  • Build a devcontainer with features enabled (e.g. via org.freedesktop.Sdk.Extension.podman) and confirm the feature build context is found instead of failing with no such file or directory

/tmp is always a private, sandbox-local tmpfs in Flatpak regardless of
--filesystem=host, so Node's os.tmpdir() (used by the devcontainers
CLI) writes build contexts there where the host-side podman
(run via host-spawn) can't see them. $XDG_RUNTIME_DIR/app/<app-id> is
the directory Flatpak actually shares with the host for this purpose,
per the Flatpak sandbox-permissions docs.

Cherry-picked from flathub#606, fixes flathub#605.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@francoism90
francoism90 merged commit 4ed1934 into master Sep 10, 2026
1 of 2 checks passed
@francoism90
francoism90 deleted the tmpdir-shared-with-host branch September 10, 2026 13:48

This branch had an error being deployed

1 failed deployment
github-pages — 85a0e866 Deployed Sep 10, 2026 by francoism90 via Deploy #10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot build devcontainers features

1 participant