The codjix/aio:node image provides a lightweight Node.js runtime environment built on Alpine Linux. This image is optimized for running JavaScript and TypeScript applications.
- Base: codjix/aio:latest (Alpine 3.20)
- Architecture: amd64, arm64
- Current Version: 21.7.3
- Node.js 21.7.3 runtime
- npm package manager included
- Non-root user
nodewith ID 1000 for better security - Optimized for minimal footprint
# Start a Node.js REPL
docker run -it --name aio-node codjix/aio:node
# Run a Node.js script
docker run -it --name aio-node -v $(pwd):/app -w /app codjix/aio:node node index.jsdocker run -d --name aio-node-app -v $(pwd):/app -w /app -p 3000:3000 codjix/aio:node node server.js# Install dependencies
docker run -it -v $(pwd):/app -w /app codjix/aio:node npm install
# Run npm scripts
docker run -it -v $(pwd):/app -w /app codjix/aio:node npm run startMount your application code to any directory, commonly /app:
docker run -it -v $(pwd):/app -w /app codjix/aio:nodeversion: '3'
services:
node-app:
image: codjix/aio:node
container_name: aio-node-app
ports:
- "3000:3000"
volumes:
- ./app:/app
working_dir: /app
command: node server.js
environment:
- NODE_ENV=production
restart: unless-stoppedversion: '3'
services:
node-dev:
image: codjix/aio:node
container_name: aio-node-dev
ports:
- "3000:3000"
volumes:
- ./app:/app
working_dir: /app
command: npm run dev
environment:
- NODE_ENV=developmentThe Dockerfile and associated scripts for this image are available in the src/node directory of the AIO repository.