Skip to main content

DevPod: Rootless, FOSS .DevContainer Tooling

A support framework for using .devcontainer on Linux desktops. Let's start with Buildah + Podman + Builder, but the project is open to contributions for other IDE integrations.

Example Project

This example assumes a working Podman installation, which exists out of the box on Fedora Silverblue but is also available on many distributions and platforms.

  1. Install this utility:

    pip install devpod
    
  2. Clone Microsoft's PHP sample repository and make it the working directory:

    git clone https://github.com/microsoft/vscode-remote-try-php.git
    cd vscode-remote-try-php/
    
  3. In .devcontainer/devcontainer.json, uncomment the postCreateCommand directive and ensure there's a comma at the end of the line if not yet fixed.

    Uncomment postCreateCommand

  4. Build the container and launch:

    devpod run --launch
    

    Building and launching the container

  5. Edit index.php in your IDE and reload the page in your Browser to see changes.

    Showing index.php in the IDE Showing index.php in the browser

Basic Setup and Usage

Setup

These instructions should work out of the box on Fedora Silverblue 33+.

  1. Install this utility (choosing an alternative to pip like pipx if you like):

    pip install devpod
    

Usage

  1. In the CLI, change to the parent directory of .devcontainer for your project.

  2. Run the utility (which will delete any container with the same name as your project directory):

    devpod run --launch  # Will open a browser to forwarded ports.
    

Troubleshooting

  • The launch command should list any open ports at the end of the process, but you can also list them using Podman directly:

     podman port --latest
    

Developing DevPod Itself

Installing the CLI Tool from Local Builds

These instructions have been tested on Fedora Silverblue 33 but are probably adaptable to other setups.

  1. Install Python package tooling (using a Toolbox if desired):

    sudo dnf install poetry pipx
    
  2. Clone the DevPod code and make it your working directory.

  3. Build and (re)install the utility for global use:

    rm -rf dist/ && poetry build && pipx install --force dist/devpod-*.tar.gz
    
  4. The devpod command should now be globally available to your user, even outside of any Toolbox.

Resources

Release files for devpod 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for devpod 0.3.0
File Size Uploaded
devpod-0.3.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for devpod 0.3.0
File Interpreter ABI Platform
devpod-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / devpod-0.3.0.tar.gz

Download URL devpod-0.3.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
60d4ae900d73572c4199170c36074b09ed36a3b6b11f268abb4f1e7e13577b31
BLAKE2b-256 checksum
How to use checksums
8ed608fd9805da88256dd51b0fdc854360523b3884b14ab77f643ff9b13b98cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.9.2 Linux/5.11.7-200.fc33.x86_64

Release files / devpod-0.3.0-py3-none-any.whl

Download URL devpod-0.3.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6807d069f6817bc2dbc7ae859dfbc1d63cebf4d5420df84db3b25004d9415dff
BLAKE2b-256 checksum
How to use checksums
c0e6a93eb888b4a4f62ff793314cf07d696bf1cc987cf646c7d776301c33062b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.9.2 Linux/5.11.7-200.fc33.x86_64

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page