Skip to content

Commit 0fffa0b

Browse files
authored
Move from mise to Make and DinD (#18)
1 parent a8271b9 commit 0fffa0b

6 files changed

Lines changed: 66 additions & 29 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM debian:trixie-slim
2+
3+
RUN apt-get update \
4+
&& apt-get install -y --no-install-recommends \
5+
bash \
6+
ca-certificates \
7+
curl \
8+
git \
9+
jq \
10+
make \
11+
shellcheck \
12+
&& rm -rf /var/lib/apt/lists/*
13+
14+
# Install Node.js 24.x and devcontainer CLI
15+
RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
16+
&& apt-get install -y --no-install-recommends nodejs \
17+
&& rm -rf /var/lib/apt/lists/* \
18+
&& npm install -g @devcontainers/cli
19+
20+
RUN groupadd --gid 1000 dev \
21+
&& useradd --uid 1000 --gid dev --shell /bin/bash --create-home dev
22+
23+
USER dev
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"features": {
3+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
4+
"version": "2.17.0",
5+
"resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:25b9f05705ffba7dbe503230ac76081419306f8c8bc88e0ce78c4ecd99a0c78c",
6+
"integrity": "sha256:25b9f05705ffba7dbe503230ac76081419306f8c8bc88e0ce78c4ecd99a0c78c"
7+
}
8+
}
9+
}

.devcontainer/devcontainer.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "devcontainer-features",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
6+
"remoteUser": "dev",
7+
"features": {
8+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
9+
"moby": false
10+
}
11+
}
12+
}

.github/copilot-instructions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ src/<feature-name>/
99
devcontainer-feature.json # Metadata, mounts, env vars, postCreateCommand
1010
install.sh # Runs at image build time (root, inside container)
1111
NOTES.md # Human-written design notes — update when making meaningful changes
12-
README.md # Auto-generated — DO NOT edit directly, run `mise run docs`
12+
README.md # Auto-generated — DO NOT edit directly, run `make docs`
1313
test/<feature-name>/
1414
test.sh # Integration test run inside container after feature install
1515
```
@@ -19,7 +19,7 @@ test/<feature-name>/
1919
1. Create `src/<feature-name>/devcontainer-feature.json`, `install.sh`, and `NOTES.md`
2020
2. Add `test/<feature-name>/test.sh` covering every installed binary and configured file
2121
3. Add the new feature to the top-level `README.md` features list
22-
4. Run `mise run docs` to generate `src/<feature-name>/README.md`
22+
4. Run `make docs` to generate `src/<feature-name>/README.md`
2323

2424
## `install.sh` Conventions
2525

@@ -42,14 +42,14 @@ reportResults
4242

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

4747
## Before Committing
4848

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

5555
## NOTES.md

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.PHONY: help docs lint-shell test
2+
3+
help: ## Show this help
4+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-15s %s\n", $$1, $$2}'
5+
6+
docs: ## Generate documentation for all features
7+
devcontainer features generate-docs -p src -n csutter/devcontainer-features
8+
9+
lint-shell: ## Lint all shell scripts using ShellCheck
10+
find . -name '*.sh' -print0 | xargs -0 shellcheck
11+
12+
test: ## Run tests for all features
13+
devcontainer features test -i docker.io/library/debian:latest
14+
devcontainer features test -i docker.io/library/ubuntu:latest
15+
devcontainer features test -i quay.io/fedora/fedora-toolbox:latest
16+
devcontainer features test -i mcr.microsoft.com/devcontainers/base:ubuntu

mise.toml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)