Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM debian:trixie-slim

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bash \
ca-certificates \
curl \
git \
jq \
make \
shellcheck \
&& rm -rf /var/lib/apt/lists/*

# Install Node.js 24.x and devcontainer CLI
RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g @devcontainers/cli

RUN groupadd --gid 1000 dev \
&& useradd --uid 1000 --gid dev --shell /bin/bash --create-home dev

USER dev
9 changes: 9 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "2.17.0",
"resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:25b9f05705ffba7dbe503230ac76081419306f8c8bc88e0ce78c4ecd99a0c78c",
"integrity": "sha256:25b9f05705ffba7dbe503230ac76081419306f8c8bc88e0ce78c4ecd99a0c78c"
}
}
}
12 changes: 12 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "devcontainer-features",
"build": {
"dockerfile": "Dockerfile"
},
"remoteUser": "dev",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": false
}
}
}
12 changes: 6 additions & 6 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ src/<feature-name>/
devcontainer-feature.json # Metadata, mounts, env vars, postCreateCommand
install.sh # Runs at image build time (root, inside container)
NOTES.md # Human-written design notes — update when making meaningful changes
README.md # Auto-generated — DO NOT edit directly, run `mise run docs`
README.md # Auto-generated — DO NOT edit directly, run `make docs`
test/<feature-name>/
test.sh # Integration test run inside container after feature install
```
Expand All @@ -19,7 +19,7 @@ test/<feature-name>/
1. Create `src/<feature-name>/devcontainer-feature.json`, `install.sh`, and `NOTES.md`
2. Add `test/<feature-name>/test.sh` covering every installed binary and configured file
3. Add the new feature to the top-level `README.md` features list
4. Run `mise run docs` to generate `src/<feature-name>/README.md`
4. Run `make docs` to generate `src/<feature-name>/README.md`

## `install.sh` Conventions

Expand All @@ -42,14 +42,14 @@ reportResults

- Add a `check` for every binary installed and every file/env var configured
- Always write tests for new functionality before considering it complete
- Run tests: `mise run test` (tests against debian, ubuntu, fedora-toolbox, devcontainers/base:ubuntu)
- Run tests: `make test` (tests against debian, ubuntu, fedora-toolbox, devcontainers/base:ubuntu)

## Before Committing

```sh
mise run lint-shell # ShellCheck all .sh files
mise run docs # Regenerate README.md from devcontainer-feature.json + NOTES.md
mise run test # Full integration test suite (requires Docker)
make lint-shell # ShellCheck all .sh files
make docs # Regenerate README.md from devcontainer-feature.json + NOTES.md
make test # Full integration test suite (requires Docker)
```

## NOTES.md
Expand Down
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.PHONY: help docs lint-shell test

help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-15s %s\n", $$1, $$2}'

docs: ## Generate documentation for all features
devcontainer features generate-docs -p src -n csutter/devcontainer-features

lint-shell: ## Lint all shell scripts using ShellCheck
find . -name '*.sh' -print0 | xargs -0 shellcheck

test: ## Run tests for all features
devcontainer features test -i docker.io/library/debian:latest
devcontainer features test -i docker.io/library/ubuntu:latest
devcontainer features test -i quay.io/fedora/fedora-toolbox:latest
devcontainer features test -i mcr.microsoft.com/devcontainers/base:ubuntu
23 changes: 0 additions & 23 deletions mise.toml

This file was deleted.

Loading