|
1 | 1 | # Devcontainer Features |
2 | 2 |
|
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. |
4 | 4 |
|
5 | 5 | ## Features |
6 | 6 |
|
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 | |
8 | 13 |
|
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 |
13 | 15 |
|
14 | | -#### Usage |
| 16 | +Add features to your `devcontainer.json`: |
15 | 17 |
|
16 | 18 | ```json |
17 | 19 | { |
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 | + } |
21 | 28 | } |
22 | 29 | ``` |
23 | 30 |
|
24 | | -## Publishing |
| 31 | +## Feature Dependencies |
25 | 32 |
|
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. |
27 | 39 |
|
28 | 40 | ## Development |
29 | 41 |
|
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 |
31 | 58 |
|
32 | 59 | ```bash |
33 | 60 | devcontainer features test -f antigravity-nix |
34 | 61 | ``` |
| 62 | + |
| 63 | +## License |
| 64 | + |
| 65 | +MIT |
0 commit comments