What Gitpod Does
- Instant Workspaces: Open any Git repository in a ready-to-code environment in seconds
- Pre-built Environments: Continuously build workspace images so they start instantly
- IDE Choice: VS Code (browser or desktop), JetBrains (IntelliJ, GoLand, PyCharm, etc.)
- Dev Containers: Define environment with
.gitpod.ymlordevcontainer.json - Port Forwarding: Automatic port detection and forwarding for running services
- Multi-Repo: Work with multiple repositories in one workspace
- Snapshots: Share exact workspace state with team members
- Self-Hosted: Deploy on your own Kubernetes cluster for enterprise use
How It Works
.gitpod.yml Configuration
# .gitpod.yml (in repository root)
image:
file: .gitpod.Dockerfile
tasks:
- name: Backend
init: |
go mod download
go build ./...
command: go run main.go
- name: Frontend
init: |
cd frontend
npm install
command: |
cd frontend
npm run dev
- name: Database
command: |
docker compose up -d postgres redis
sleep 5
npx prisma migrate deploy
ports:
- port: 3000
onOpen: open-preview
name: Frontend
- port: 8080
onOpen: ignore
name: Backend API
- port: 5432
onOpen: ignore
name: PostgreSQL
vscode:
extensions:
- golang.go
- dbaeumer.vscode-eslint
- esbenp.prettier-vscode.gitpod.Dockerfile
FROM gitpod/workspace-full
# Install Go 1.22
RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh && sdk install go 1.22.0"
# Install project-specific tools
RUN npm install -g prisma
RUN curl -sSf https://install.surrealdb.com | shKey Features
Prebuilds
Gitpod continuously builds workspace images in the background:
Git Push → Trigger Prebuild → Run init tasks → Cache workspace image
Developer opens workspace → Skip init → Start instantlyWithout prebuilds: 5-10 minutes to install dependencies With prebuilds: < 10 seconds to start coding
IDE Support
| IDE | Access Method |
|---|---|
| VS Code Browser | Opens in browser tab |
| VS Code Desktop | SSH remote connection |
| IntelliJ IDEA | JetBrains Gateway |
| GoLand | JetBrains Gateway |
| PyCharm | JetBrains Gateway |
| PhpStorm | JetBrains Gateway |
| CLion | JetBrains Gateway |
Workspace Classes
| Class | CPU | RAM | Storage |
|---|---|---|---|
| Standard | 4 cores | 8 GB | 30 GB |
| Large | 8 cores | 16 GB | 50 GB |
| X-Large | 16 cores | 32 GB | 100 GB |
Self-Hosting
Kubernetes Deployment
# Install Gitpod on your Kubernetes cluster
kubectl apply -f https://raw.githubusercontent.com/gitpod-io/gitpod/main/install/installer/manifests/gitpod.yaml
# Or use the installer CLI
docker run --rm -it gitpod/installer:latest init > gitpod-config.yaml
# Edit gitpod-config.yaml
docker run --rm -v $(pwd):/workspace gitpod/installer:latest render
--config /workspace/gitpod-config.yaml > k8s-manifests.yaml
kubectl apply -f k8s-manifests.yamlRequirements: Kubernetes 1.24+, cert-manager, DNS wildcard, 16+ CPU cores, 64+ GB RAM.
Use Cases
Open Source Projects
Add a Gitpod button to README:
[](https://gitpod.io/#https://github.com/your/repo)Contributors can start contributing without any local setup.
Code Review
Open PR in Gitpod → Run app → Test changes → Approve/CommentReview code with a running application, not just reading diffs.
Onboarding
New developer joins → Opens Gitpod → Full dev environment ready in seconds. No 2-day setup guides, no "install these 15 tools" documents.
Gitpod vs Alternatives
| Feature | Gitpod | GitHub Codespaces | DevPod | Coder |
|---|---|---|---|---|
| Open Source | Yes (AGPL-3.0) | No | Yes (MPL) | Yes (AGPL) |
| Self-hosted | Yes | No | Yes | Yes |
| Prebuilds | Yes | Yes | No | No |
| IDE options | VS Code + JetBrains | VS Code | Any IDE | VS Code + JetBrains |
| Git providers | GitHub, GitLab, Bitbucket | GitHub only | Any | Any |
| Cloud hosted | gitpod.io | github.dev | No | coder.com |
常见问题
Q: Gitpod 和 GitHub Codespaces 怎么选? A: 如果你只用 GitHub 且不需要自托管,Codespaces 集成更紧密。如果你用 GitLab/Bitbucket、需要 JetBrains IDE、或需要自托管,选 Gitpod。Gitpod 的 prebuild 功能通常使启动更快。
Q: 自托管成本高吗? A: 需要一个 Kubernetes 集群(最低 16 核 64GB)。对于 10+ 人的团队,自托管的成本通常低于按用户付费的 SaaS。可以使用现有的 K8s 集群。
Q: 离线能用吗? A: 不能。Gitpod 依赖云端计算资源。网络中断会影响使用。对于需要离线工作的场景,推荐使用 DevPod(本地 + 云端混合模式)。
来源与致谢
- GitHub: gitpod-io/gitpod — 13.6K+ ⭐ | AGPL-3.0
- 官网: gitpod.io