Skip to content

Commit 279b5c9

Browse files
committed
feat: devcontainer features for Nix, Node.js, GCloud CLI, and Dataform CLI
- antigravity-nix: Creates vscode user, installs Nix with flakes - node: Installs Node.js from NodeSource - gcloud-cli: Installs Google Cloud CLI - dataform-cli: Installs Dataform CLI via npm
1 parent 047ef3c commit 279b5c9

17 files changed

Lines changed: 238 additions & 25 deletions

File tree

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: devcontainers/action@v1
2222
with:
2323
publish-features: "true"
24-
base-path-to-features: "./src"
24+
base-path-to-features: "./src/features"
2525
generate-docs: "true"
2626
env:
2727
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# OS files
2+
.DS_Store
3+
Thumbs.db
4+
5+
# Editor
6+
.vscode/
7+
.idea/
8+
9+
# Node
10+
node_modules/
11+
12+
# Test artifacts
13+
*.log

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Jasper Duizendstra
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,65 @@
11
# Devcontainer Features
22

3-
Custom devcontainer features for Antigravity IDE development environments.
3+
A collection of reusable [Dev Container Features](https://containers.dev/implementors/features/) for development environments.
44

55
## Features
66

7-
### `antigravity-nix`
7+
| Feature | Description |
8+
|---------|-------------|
9+
| [antigravity-nix](src/features/antigravity-nix) | Creates vscode user, installs Nix with flakes, and essential tools |
10+
| [node](src/features/node) | Installs Node.js from NodeSource with version selection |
11+
| [gcloud-cli](src/features/gcloud-cli) | Installs Google Cloud CLI via official Debian packages |
12+
| [dataform-cli](src/features/dataform-cli) | Installs Dataform CLI via npm |
813

9-
A consolidated feature that provides:
10-
- **vscode user** (uid/gid 1000) with passwordless sudo
11-
- **Nix package manager** (single-user mode with flakes enabled)
12-
- **Essential tools**: wget, git, curl, sudo, ca-certificates
14+
## Usage
1315

14-
#### Usage
16+
Add features to your `devcontainer.json`:
1517

1618
```json
1719
{
18-
"features": {
19-
"ghcr.io/duizendstra/devcontainer-features/antigravity-nix:1": {}
20-
}
20+
"features": {
21+
"ghcr.io/duizendstra/devcontainer-features/antigravity-nix:1": {},
22+
"ghcr.io/duizendstra/devcontainer-features/node:1": {
23+
"version": "lts"
24+
},
25+
"ghcr.io/duizendstra/devcontainer-features/gcloud-cli:1": {},
26+
"ghcr.io/duizendstra/devcontainer-features/dataform-cli:1": {}
27+
}
2128
}
2229
```
2330

24-
## Publishing
31+
## Feature Dependencies
2532

26-
Features are automatically published to `ghcr.io/duizendstra/devcontainer-features/` when pushed to main.
33+
```
34+
antigravity-nix → node → dataform-cli
35+
→ gcloud-cli
36+
```
37+
38+
Features are automatically ordered based on their dependencies.
2739

2840
## Development
2941

30-
To test features locally, use the dev container CLI:
42+
### Structure
43+
44+
```
45+
src/features/
46+
├── antigravity-nix/
47+
│ ├── devcontainer-feature.json
48+
│ └── install.sh
49+
├── node/
50+
├── gcloud-cli/
51+
└── dataform-cli/
52+
53+
test/features/
54+
└── (test scripts for each feature)
55+
```
56+
57+
### Testing
3158

3259
```bash
3360
devcontainer features test -f antigravity-nix
3461
```
62+
63+
## License
64+
65+
MIT

src/antigravity-nix/devcontainer-feature.json

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"id": "antigravity-nix",
3+
"version": "1.0.0",
4+
"name": "Nix with Flakes",
5+
"description": "Creates vscode user with passwordless sudo, installs Nix with flakes, and essential tools",
6+
"options": {},
7+
"containerEnv": {
8+
"NIX_CONF_DIR": "/etc/nix"
9+
}
10+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ apt-get install -y --no-install-recommends \
1313
curl \
1414
ca-certificates \
1515
xz-utils \
16-
gnupg
16+
gnupg \
17+
procps
1718
rm -rf /var/lib/apt/lists/*
1819

1920
# --- 2. Create vscode user ---
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"id": "dataform-cli",
3+
"version": "1.0.0",
4+
"name": "Dataform CLI",
5+
"description": "Installs the Dataform CLI (@dataform/cli) via npm",
6+
"options": {},
7+
"installsAfter": [
8+
"ghcr.io/duizendstra/devcontainer-features/node"
9+
]
10+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
echo "=== Dataform CLI Feature ==="
5+
6+
if ! command -v npm &> /dev/null; then
7+
echo "Error: npm is not installed. This feature depends on the Node.js feature."
8+
exit 1
9+
fi
10+
11+
npm install -g @dataform/cli
12+
13+
echo "Dataform CLI installed successfully!"
14+
dataform --version
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"id": "gcloud-cli",
3+
"version": "1.0.0",
4+
"name": "Google Cloud CLI",
5+
"description": "Installs the Google Cloud CLI via official Debian packages",
6+
"options": {},
7+
"installsAfter": [
8+
"ghcr.io/duizendstra/devcontainer-features/antigravity-nix"
9+
]
10+
}

0 commit comments

Comments
 (0)