chore: add containerised dev environment - #271
Open
lgnap wants to merge 1 commit into
Open
Conversation
Run the harness, tests and build without installing Node 24 / npm 11 on the host. The image pins the versions from package.json "engines", so contributors get the same toolchain regardless of what their distro ships. - Dockerfile: node:24-slim, deps installed in their own layer. `npm ci` uses --ignore-scripts because the root "prepare": "tsc" hook cannot run before the sources are copied, and is unnecessary: tsx executes TypeScript directly. - docker-entrypoint.sh: creates an empty .env when absent (every npm script runs `tsx --env-file=.env`, which aborts on a missing file) and restores node_modules on the first run with a bind mount. - docker-compose.yml: bind-mounts the tree with :z for SELinux, keeps node_modules in a named volume so it never lands in the host tree. - Makefile: self-documenting targets (make park PARK=efteling, make test, make web...). Defaults to podman-compose; override with `make COMPOSE="docker compose" dev` on a Docker host. - .dockerignore: excludes caches, secrets and build output from the context. Verified in-container: `make compile` clean, `make test` 1536 tests passing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run the harness, tests and build without installing Node 24 / npm 11 on the host. The image pins the versions from package.json "engines", so contributors get the same toolchain regardless of what their distro ships.
npm ciuses --ignore-scripts because the root "prepare": "tsc" hook cannot run before the sources are copied, and is unnecessary: tsx executes TypeScript directly.tsx --env-file=.env, which aborts on a missing file) and restores node_modules on the first run with a bind mount.make COMPOSE="docker compose" devon a Docker host.Verified in-container:
make compileclean,make test1536 tests passing.