attach-ubuntu

Creates a disposable Ubuntu Docker container with the project mounted at /workdir and attaches VS Code Dev Containers.

7|5|Updated Jul 22, 2025
One-click install
npx skills add https://github.com/nebius/nebius-ps-services --skill attach-ubuntu-nebius
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: attach-ubuntu
Source: https://github.com/nebius/nebius-ps-services/tree/main/skills/attach-ubuntu
Command: npx skills add https://github.com/nebius/nebius-ps-services --skill attach-ubuntu-nebius

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Testing Linux behavior from macOS usually requires manual Docker setup, container naming, bind mounts, and editor configuration. This Skill automates launching or reusing a per-project Ubuntu container so developers can validate Linux behavior without polluting the host machine or adding a repo-local .devcontainer directory. ## Core Features & Use Cases - Per-project container lifecycle: Derives a stable container name from the project folder, reuses matching containers, and recreates them when image, mount, or workdir drift; supports --stop and --remove cleanup. - Git-aware mounting: Mounts the project at /workdir, or mounts the enclosing repository root with a /workdir symlink so version-aware tools like setuptools-scm still see real Git metadata. - Toolchain bootstrap: Installs Ubuntu build tools, detects the preferred Python version from .python-version, runtime.txt, or pyproject.toml, and provisions a container-only virtual environment at /opt/attach-ubuntu/venv. - VS Code integration: Writes an attached-container config and best-effort opens a Dev Containers window, with a manual Command Palette fallback. - Use Case: A macOS developer needs to verify that a Python package builds and tests pass on Ubuntu 24.04; running the helper script launches the container, installs dependencies, and opens VS Code attached to it. ## Quick Start Ask the assistant to run the attach-ubuntu script from your project directory to launch the Ubuntu container and open it in a VS Code Dev Containers window.

Frequently Asked Questions about attach-ubuntu

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I launch an Ubuntu Docker container for my project on macOS?

Run scripts/attach-ubuntu.sh from the project directory. It derives a container name from the folder, bind-mounts the project at /workdir, bootstraps build tools, and best-effort opens a VS Code Dev Containers window.

How do I attach VS Code to a running Docker container?

The script writes an attached-container config and requests a new window via the attached-container remote URI. If auto-attach fails, use the Command Palette action 'Dev Containers: Attach to Running Container...' and select the derived container name.

Does the container preserve Git metadata for setuptools-scm?

Yes. When the project folder sits inside a larger repository without its own .git, the script mounts the repo root at /opt/attach-ubuntu/repo-root and symlinks the project subdirectory to /workdir, so version-aware tools still see the real repository.

Can I skip dependency installation or the VS Code window?

Yes. Use --no-bootstrap to skip toolchain and project dependency installation, --no-open to prepare the container without opening VS Code, and --no-vscode-config to skip attached-container config updates. A --dry-run flag prints actions without changes.

How do I stop or remove the per-project Ubuntu container?

Run the script with --stop to stop the derived container or --remove to delete it. The script is idempotent: it reuses a running container when image, mount, and workdir match, and recreates it otherwise.