docker.recipes

Eclipse Theia Cloud IDE

intermediate

Cloud IDE with Eclipse Theia supporting multiple languages and plugins.

Overview

Eclipse Theia is a modern, web-based IDE framework that brings VS Code-like functionality to the browser while maintaining extensibility through the Language Server Protocol and VS Code extension ecosystem. Built on TypeScript and running on Node.js, Theia offers a truly cloud-native development environment that supports multiple programming languages including Go, Rust, Python, and JavaScript out of the box. Unlike traditional desktop IDEs, Theia enables teams to standardize development environments across different machines and operating systems while providing the familiar interface developers expect from modern code editors. This stack combines Theia with PostgreSQL for relational data storage, MongoDB for document-based development projects, and Redis for caching and session management. The configuration creates a complete cloud development workspace where developers can build full-stack applications with immediate access to multiple database technologies. Adminer provides a web-based database administration interface, eliminating the need to install separate database clients or configure complex connection tunnels. Development teams working on polyglot applications, remote development scenarios, or those requiring consistent development environments across team members will find this stack particularly valuable. The combination is ideal for organizations transitioning to cloud-native development practices, educational institutions providing standardized coding environments, or companies building applications that require both relational and NoSQL data storage patterns.

Key Features

  • VS Code extension compatibility with full Language Server Protocol support for Go, Rust, TypeScript, and Python
  • Web-based terminal with Node.js, npm, and development tools pre-installed in the Theia container
  • PostgreSQL 15 with JSONB support for hybrid relational-document data models in development projects
  • MongoDB 6.0 with automatic replica set initialization for testing distributed database scenarios
  • Redis 7 integration for caching layer development and session storage testing
  • Adminer web interface supporting both PostgreSQL and MongoDB connections through a single interface
  • Git integration with environment variable configuration for automatic commit attribution
  • Workspace persistence allowing projects to survive container restarts and updates

Common Use Cases

  • 1Full-stack web application development requiring both PostgreSQL and MongoDB data storage
  • 2Remote development teams needing consistent Node.js and database environments
  • 3Code bootcamps and educational institutions providing browser-based development environments
  • 4API development and testing with immediate database access for backend services
  • 5Microservices development where different services use different database technologies
  • 6Rapid prototyping of applications requiring Redis caching with persistent data storage
  • 7Organizations implementing Infrastructure as Code for development environment standardization

Prerequisites

  • Docker Engine 20.10+ and Docker Compose v2 for container orchestration
  • Minimum 4GB RAM available for containers (Theia: 1GB, PostgreSQL: 512MB, MongoDB: 1GB, Redis: 256MB)
  • Ports 3000, 5432, 6379, 8080, and 27017 available on the host system
  • Basic familiarity with VS Code interface and extensions for optimal Theia usage
  • Understanding of environment variables for Git configuration (GIT_USER, GIT_EMAIL, POSTGRES_PASSWORD)
  • Local workspace directory structure for persistent file storage between container sessions

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 theia:
3 image: theiaide/theia-full:latest
4 ports:
5 - "3000:3000"
6 volumes:
7 - ./workspace:/home/project
8 - theia_data:/home/theia
9 environment:
10 - GITPOD_GIT_USER_NAME=${GIT_USER}
11 - GITPOD_GIT_USER_EMAIL=${GIT_EMAIL}
12 networks:
13 - theia_net
14
15 postgres:
16 image: postgres:15-alpine
17 environment:
18 - POSTGRES_USER=dev
19 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
20 - POSTGRES_DB=devdb
21 volumes:
22 - postgres_data:/var/lib/postgresql/data
23 ports:
24 - "5432:5432"
25 networks:
26 - theia_net
27
28 redis:
29 image: redis:7-alpine
30 ports:
31 - "6379:6379"
32 volumes:
33 - redis_data:/data
34 networks:
35 - theia_net
36
37 mongodb:
38 image: mongo:6
39 ports:
40 - "27017:27017"
41 volumes:
42 - mongo_data:/data/db
43 networks:
44 - theia_net
45
46 adminer:
47 image: adminer:latest
48 ports:
49 - "8080:8080"
50 networks:
51 - theia_net
52
53volumes:
54 theia_data:
55 postgres_data:
56 redis_data:
57 mongo_data:
58
59networks:
60 theia_net:

.env Template

.env
1# Theia IDE
2POSTGRES_PASSWORD=secure_postgres_password
3GIT_USER=Your Name
4GIT_EMAIL=your@email.com
5
6# Theia at http://localhost:3000
7# Adminer at http://localhost:8080

Usage Notes

  1. 1Theia IDE at http://localhost:3000
  2. 2Full VS Code extensions support
  3. 3Multiple language support built-in
  4. 4Connect to databases for development
  5. 5Git configured automatically

Individual Services(5 services)

Copy individual services to mix and match with your existing compose files.

theia
theia:
  image: theiaide/theia-full:latest
  ports:
    - "3000:3000"
  volumes:
    - ./workspace:/home/project
    - theia_data:/home/theia
  environment:
    - GITPOD_GIT_USER_NAME=${GIT_USER}
    - GITPOD_GIT_USER_EMAIL=${GIT_EMAIL}
  networks:
    - theia_net
postgres
postgres:
  image: postgres:15-alpine
  environment:
    - POSTGRES_USER=dev
    - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
    - POSTGRES_DB=devdb
  volumes:
    - postgres_data:/var/lib/postgresql/data
  ports:
    - "5432:5432"
  networks:
    - theia_net
redis
redis:
  image: redis:7-alpine
  ports:
    - "6379:6379"
  volumes:
    - redis_data:/data
  networks:
    - theia_net
mongodb
mongodb:
  image: mongo:6
  ports:
    - "27017:27017"
  volumes:
    - mongo_data:/data/db
  networks:
    - theia_net
adminer
adminer:
  image: adminer:latest
  ports:
    - "8080:8080"
  networks:
    - theia_net

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 theia:
5 image: theiaide/theia-full:latest
6 ports:
7 - "3000:3000"
8 volumes:
9 - ./workspace:/home/project
10 - theia_data:/home/theia
11 environment:
12 - GITPOD_GIT_USER_NAME=${GIT_USER}
13 - GITPOD_GIT_USER_EMAIL=${GIT_EMAIL}
14 networks:
15 - theia_net
16
17 postgres:
18 image: postgres:15-alpine
19 environment:
20 - POSTGRES_USER=dev
21 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
22 - POSTGRES_DB=devdb
23 volumes:
24 - postgres_data:/var/lib/postgresql/data
25 ports:
26 - "5432:5432"
27 networks:
28 - theia_net
29
30 redis:
31 image: redis:7-alpine
32 ports:
33 - "6379:6379"
34 volumes:
35 - redis_data:/data
36 networks:
37 - theia_net
38
39 mongodb:
40 image: mongo:6
41 ports:
42 - "27017:27017"
43 volumes:
44 - mongo_data:/data/db
45 networks:
46 - theia_net
47
48 adminer:
49 image: adminer:latest
50 ports:
51 - "8080:8080"
52 networks:
53 - theia_net
54
55volumes:
56 theia_data:
57 postgres_data:
58 redis_data:
59 mongo_data:
60
61networks:
62 theia_net:
63EOF
64
65# 2. Create the .env file
66cat > .env << 'EOF'
67# Theia IDE
68POSTGRES_PASSWORD=secure_postgres_password
69GIT_USER=Your Name
70GIT_EMAIL=your@email.com
71
72# Theia at http://localhost:3000
73# Adminer at http://localhost:8080
74EOF
75
76# 3. Start the services
77docker compose up -d
78
79# 4. View logs
80docker 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/theia-ide-complete/run | bash

Troubleshooting

  • Theia shows 'Cannot connect to workspace': Ensure ./workspace directory exists and has proper permissions (chmod 755)
  • VS Code extensions fail to install in Theia: Check container memory limits and increase Docker Desktop memory allocation to 6GB+
  • PostgreSQL connection refused from Adminer: Use service name 'postgres' instead of 'localhost' when connecting through Adminer
  • MongoDB authentication errors: MongoDB container runs without authentication by default - connect using only hostname 'mongodb' and port 27017
  • Git commits show 'unknown author': Set GIT_USER and GIT_EMAIL environment variables in .env file before starting containers
  • Workspace files disappear after restart: Verify volume mount ./workspace:/home/project is correctly mapped to an existing local directory

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

Ad Space