docker.recipes

DevPod + Local Provider

intermediate

Open source development environments with multiple providers.

Overview

DevPod is an open-source client-only development environment manager that creates reproducible, containerized workspaces from any Git repository. Developed by Loft Labs, DevPod eliminates the vendor lock-in associated with GitHub Codespaces or GitPod by providing a unified interface that works with multiple infrastructure providers including Docker, Kubernetes, AWS, Google Cloud, and Azure. Unlike traditional cloud development environments, DevPod runs entirely on your local machine or chosen infrastructure, giving you complete control over your development workflow. This configuration combines DevPod with its Docker provider to create local development containers that automatically configure themselves based on devcontainer.json specifications found in your repositories. The Docker provider enables DevPod to spin up development environments using your local Docker daemon, providing fast startup times and direct access to local resources while maintaining the isolation and reproducibility benefits of containerized development. The setup mounts the Docker socket to allow DevPod to manage container lifecycles and provisions persistent volumes for workspace data and DevPod's internal configuration. This stack is ideal for development teams seeking to standardize their development environments without relying on cloud services, freelancers working across multiple client projects with different tech stacks, and organizations that need to maintain development environment consistency while keeping code and development activities on-premises. The combination provides the convenience of automated environment setup with the performance and security of local development.

Key Features

  • Multi-provider architecture supporting Docker, Kubernetes, SSH, and major cloud platforms
  • Automatic devcontainer.json parsing and environment provisioning from Git repositories
  • IDE-agnostic development with support for VS Code, JetBrains IDEs, and vim/neovim
  • Git integration with automatic workspace creation from repository URLs
  • Workspace lifecycle management including create, start, stop, and delete operations
  • Port forwarding and environment variable injection for local development workflows
  • CLI-first approach with optional web interface for workspace management
  • Cross-platform compatibility with Linux, macOS, and Windows support

Common Use Cases

  • 1Onboarding new developers with consistent, pre-configured development environments
  • 2Managing multiple client projects with different technology stacks and dependencies
  • 3Creating isolated development environments for different Git branches or features
  • 4Standardizing development toolchains across distributed development teams
  • 5Running legacy applications in controlled environments without affecting host systems
  • 6Conducting code reviews and testing in clean, reproducible environments
  • 7Developing applications that require specific operating system or runtime versions

Prerequisites

  • Docker Engine 20.10+ with at least 4GB available RAM for development containers
  • Git client installed and configured for repository access
  • Port 8080 available for DevPod web interface (if using web UI)
  • Understanding of devcontainer.json specification and container development workflows
  • Sufficient disk space for workspace volumes and container images (minimum 10GB recommended)
  • Basic familiarity with container concepts and development environment configuration

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 devpod:
3 image: ghcr.io/loft-sh/devpod:latest
4 environment:
5 - DEVPOD_HOME=/devpod
6 volumes:
7 - /var/run/docker.sock:/var/run/docker.sock
8 - devpod-data:/devpod
9 - devpod-workspaces:/workspaces
10 ports:
11 - "8080:8080"
12 networks:
13 - devpod-network
14 restart: unless-stopped
15
16volumes:
17 devpod-data:
18 devpod-workspaces:
19
20networks:
21 devpod-network:
22 driver: bridge

.env Template

.env
1# DevPod
2# CLI-based tool
3# Install: curl -L -o devpod "https://github.com/loft-sh/devpod/releases/latest/download/devpod-linux-amd64"
4
5# Use devcontainer.json for configuration

Usage Notes

  1. 1CLI-based development
  2. 2devcontainer.json compatible
  3. 3Multiple provider backends
  4. 4IDE integration
  5. 5Git repository workspaces

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 devpod:
5 image: ghcr.io/loft-sh/devpod:latest
6 environment:
7 - DEVPOD_HOME=/devpod
8 volumes:
9 - /var/run/docker.sock:/var/run/docker.sock
10 - devpod-data:/devpod
11 - devpod-workspaces:/workspaces
12 ports:
13 - "8080:8080"
14 networks:
15 - devpod-network
16 restart: unless-stopped
17
18volumes:
19 devpod-data:
20 devpod-workspaces:
21
22networks:
23 devpod-network:
24 driver: bridge
25EOF
26
27# 2. Create the .env file
28cat > .env << 'EOF'
29# DevPod
30# CLI-based tool
31# Install: curl -L -o devpod "https://github.com/loft-sh/devpod/releases/latest/download/devpod-linux-amd64"
32
33# Use devcontainer.json for configuration
34EOF
35
36# 3. Start the services
37docker compose up -d
38
39# 4. View logs
40docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/devpod-complete/run | bash

Troubleshooting

  • DevPod fails to create workspace: Ensure Docker daemon is running and accessible, check Docker socket permissions
  • Workspace creation hangs during image build: Increase Docker daemon memory allocation or check for network connectivity issues
  • Port forwarding not working: Verify target ports are not already in use on host system and container is properly started
  • Git repository access denied: Configure Git credentials or SSH keys, ensure repository URL is accessible
  • DevPod web interface not accessible: Check if port 8080 is bound correctly and not blocked by firewall rules
  • Workspace data not persisting: Verify volume mounts are configured correctly and Docker has write permissions to volume directories

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Components

devpoddocker-provider

Tags

#devpod#dev-containers#remote-development#codespaces

Category

Development Tools
Ad Space