Problem
When building Docker images for dev server mode, the .iloom directory (containing config, prompts, metadata) is included in the build context. This is unnecessary — it bloats the context sent to the Docker daemon and could leak iloom-specific files into images.
Proposed Solution
Pipe a filtered tar archive to docker build via stdin instead of passing . as the build context:
tar -c --exclude='.iloom' -C /worktree . | docker build -t imageName -f ./Dockerfile -
In code, replace args.push('.') with args.push('-') and pipe a tar subprocess (with --exclude=.iloom) into docker's stdin:
const tar = execa('tar', ['-c', '--exclude=.iloom', '.'], { cwd: worktreePath })
await execa('docker', args, { stdin: tar.stdout, stdout: 'inherit', stderr: 'inherit' })
Why not .dockerignore?
- Requires creating/modifying a user-controlled file
- Would need cleanup logic and git status management
- Doesn't work if the project already has a
.dockerignore that gets overwritten
Why not --ignore?
Docker CLI has no --ignore flag for inline ignore patterns.
Files to change
src/lib/DockerDevServerStrategy.ts — buildImage() method
src/lib/DockerManager.ts — buildImage() static method
Notes
- Verify execa v8 subprocess piping API (
.pipe() or stdin option)
- Docker reads
-f ./Dockerfile relative to the tar context, so existing -f usage should work unchanged
stdio: 'inherit' for stdout/stderr must be preserved so build progress is visible
Problem
When building Docker images for dev server mode, the
.iloomdirectory (containing config, prompts, metadata) is included in the build context. This is unnecessary — it bloats the context sent to the Docker daemon and could leak iloom-specific files into images.Proposed Solution
Pipe a filtered tar archive to
docker buildvia stdin instead of passing.as the build context:In code, replace
args.push('.')withargs.push('-')and pipe a tar subprocess (with--exclude=.iloom) into docker's stdin:Why not
.dockerignore?.dockerignorethat gets overwrittenWhy not
--ignore?Docker CLI has no
--ignoreflag for inline ignore patterns.Files to change
src/lib/DockerDevServerStrategy.ts—buildImage()methodsrc/lib/DockerManager.ts—buildImage()static methodNotes
.pipe()orstdinoption)-f ./Dockerfilerelative to the tar context, so existing-fusage should work unchangedstdio: 'inherit'for stdout/stderr must be preserved so build progress is visible