Fix nix-shell dev container build errors #30

Closed
opened 2026-05-01 21:13:09 +02:00 by myrmidex · 0 comments
Owner

Two errors when running dev-up from nix-shell:

1. Node.js dpkg conflicts during Docker build

The dev Dockerfile installs Node.js via the nodesource script inside the container, which conflicts with Debian's system-packaged node modules (e.g. node-normalize-path, node-corepack, libnode115). Lots of dpkg dependency warnings during the build, though it ultimately succeeds.

Fix: clean up the Dockerfile to avoid the conflict — either remove the nodesource install step and use the system Node, or add apt-get remove -y nodejs before the nodesource install to avoid the partial-removal warnings.

2. Missing composer.lock at build time

Error: building at STEP "COPY composer.json composer.lock ./": checking on sources under "/home/myrmidex/Projects/code/incr/incr": copier: stat: "/composer.lock": no such file or directory

The Dockerfile copies composer.lock but the file doesn't exist in the repo (likely gitignored or never committed).

Fix: either commit composer.lock, or change the COPY step to COPY composer.json ./ and run composer install without the lockfile, or generate the lockfile and add it to the repo.

Files to look at

  • docker/dev/podman/Dockerfile
  • docker/dev/podman/docker-compose.yml
  • .gitignore (check if composer.lock is excluded)
Two errors when running `dev-up` from nix-shell: ## 1. Node.js dpkg conflicts during Docker build The dev `Dockerfile` installs Node.js via the nodesource script inside the container, which conflicts with Debian's system-packaged node modules (e.g. `node-normalize-path`, `node-corepack`, `libnode115`). Lots of dpkg dependency warnings during the build, though it ultimately succeeds. **Fix**: clean up the Dockerfile to avoid the conflict — either remove the nodesource install step and use the system Node, or add `apt-get remove -y nodejs` before the nodesource install to avoid the partial-removal warnings. ## 2. Missing `composer.lock` at build time ``` Error: building at STEP "COPY composer.json composer.lock ./": checking on sources under "/home/myrmidex/Projects/code/incr/incr": copier: stat: "/composer.lock": no such file or directory ``` The `Dockerfile` copies `composer.lock` but the file doesn't exist in the repo (likely gitignored or never committed). **Fix**: either commit `composer.lock`, or change the `COPY` step to `COPY composer.json ./` and run `composer install` without the lockfile, or generate the lockfile and add it to the repo. ## Files to look at - `docker/dev/podman/Dockerfile` - `docker/dev/podman/docker-compose.yml` - `.gitignore` (check if `composer.lock` is excluded)
myrmidex added this to the v0.3.0 milestone 2026-05-01 21:13:09 +02:00
myrmidex added the
bug
label 2026-05-01 21:13:09 +02:00
myrmidex self-assigned this 2026-05-01 21:13:09 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lvl0/incr#30
No description provided.