SPCS Dev Container
Open a browser. Start coding inside Snowflake.
VS Code, a web terminal and persistent storage on Snowflake Container Services.
Kevin Keller ยท kevinkeller.org
Why it matters
SPCS is not just for production
It is a fully managed container runtime with compute pools, persistent storage, network isolation and auto-suspend. That makes it a surprisingly good development platform.
Think of it as IaaS powered by Snowflake.
What you get
A complete toolbox in one container
| Component | Purpose |
|---|---|
| OpenVSCode Server | VS Code in the browser |
| ttyd | Web terminal |
| supervisord (Go) | Restarts crashed services |
| Pixi and asdf | Python, Node, Rust and 600+ plugins |
| GitHub CLI | Pull requests and issues |
Access
Two endpoints, both behind Snowflake authentication
- One URL for VS Code, one for the terminal
- Only users with the right role can reach them
- No local Docker, no SSH keys, no port forwarding
The idea
You are already inside Snowflake's network
Query data, manage objects and test UDFs with no VPN, no firewall rules and no connection strings to the internet.
Setup
Four steps to a running IDE
- Build and push the image (linux/amd64)
- Create the database, image repository and compute pool
- Deploy the service from its specification
- Get your URLs with
SHOW ENDPOINTS
Persistence
Your home directory lives on a Snowflake stage
| Persists | Does not persist |
|---|---|
| Pixi and asdf tools | apt-installed packages |
Code in ~/workspace | /tmp files |
| Dotfiles and history | Running processes |
| VS Code extensions | Environment variables |
Cost
When the pool is suspended, cost is zero
- Auto-suspend after 1 hour of inactivity by default
- Shorten it, for example
AUTO_SUSPEND_SECS = 900 - Pay only for compute time; stage storage costs pennies
Customisation
Bigger, tighter or richer, without losing data
- More power: switch the instance family
- Tighter network: egress rules for named hosts only
- More tools: add packages to the Dockerfile
- Safe updates: rebuilding the image keeps the volume
The takeaway
A compute pool with auto-suspend and a stage is a full development platform.
Code: github.com/sfc-gh-kkeller/spcs-devcontainer (MIT)