A devcontainer image for Node.js CLI tool development.
944
A security-hardened, minimal Debian Trixie-based Docker image for Node.js CLI tool development, created for use in the development of Chromamancer. Built with Volta for Node.js version management and includes essential development tools while removing unnecessary system components to minimize attack surface.
node user (UID 1000, GID 1000)cat replacement with syntax highlightingls (maintained fork of exa)apt, dpkg) from runtime imagecurl, wget)perl)docker pull lvnacy/chromamancer-dev
docker run -it --rm \
-v $(pwd):/home/node/workspace \
lvnacy/chromamancer-dev
docker run -it --rm \
--read-only \
--tmpfs /tmp:noexec,nosuid,nodev \
--cap-drop=ALL \
--security-opt=no-new-privileges:true \
-v $(pwd):/home/node/workspace \
lvnacy/chromamancer-dev
FROM lvnacy/chromamancer-dev
# Install project-specific dependencies
COPY package.json pnpm-lock.yaml ./
RUN pnpm install
# Copy project files
COPY . .
# Your custom commands here
Add to .devcontainer/devcontainer.json:
{
"name": "Node.js CLI Development",
"image": "lvnacy/chromamancer-dev",
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
},
"remoteUser": "node",
"workspaceFolder": "/home/node/workspace"
}
The container includes convenient shell aliases:
ll → eza -la (detailed directory listing)cat → bat (syntax-highlighted file viewing)VOLTA_HOME: /home/node/.voltaPATH: Includes Volta bin directoryNODE_OPTIONS: --no-warningsgit clone [email protected]:lvnacy/chromamancer-dev
cd chromamancer-dev
docker build -t lvnacy/chromamancer-dev .
This image is ideal for:
While this image removes many attack vectors by eliminating package managers and network tools, always consider your specific security requirements:
--read-only filesystem when possible--cap-drop=ALLnoexec, nosuid, nodevThe following are explicitly removed from the runtime image to reduce attack surface:
apt, dpkgcurl, wgetperladduser, deluser/var/cache/apt, /var/lib/apt/usr/share/man, /usr/share/doc/etc/aptCheck installed versions:
docker run --rm lvnacy/chromamancer-dev node --version
docker run --rm lvnacy/chromamancer-dev pnpm --version
Contributions are welcome! Please feel free to submit issues or pull requests.
MIT
For issues, questions, or suggestions, please open an issue on GitHub.
Content type
Image
Digest
sha256:1002fc6b2…
Size
141.3 MB
Last updated
9 months ago
docker pull lvnacy/chromamancer-dev