A Docker-based development environment for ioBroker developers with SSH access, Git integration, and the official ioBroker Dev-Server.
iobnode provides a complete development environment for:
- ioBroker adapter developers
- Contributors to ioBroker core
- Teams requiring consistent development environments
- Developers using remote development via SSH
- Node.js: Version 22
- npm: Bundled with Node.js
- Yarn: Version 1.22.19
- @iobroker/dev-server: Globally installed
- Development Tools: gcc, g++, make, git, vim, curl, sudo
- SSH Server: For remote access
- Base OS: Debian Bookworm Slim
- Main User:
node(UID: 1000, GID: 1000) - Dev User:
iobdev(for development work) - Architecture: Multi-arch support (amd64, arm64, armhf, etc.)
- 22: SSH access
- 8081: ioBroker Dev-Server
docker run -d \
--name iobroker-dev \
-p 2222:22 \
-p 8081:8081 \
-e GIT_USERNAME="Your Name" \
-e GIT_EMAIL="your.email@example.com" \
-v $(pwd)/workspace:/workspace \
-v ~/.ssh/id_rsa.pub:/root/.ssh/authorized_keys:ro \
marc-berg/iobnode:latestversion: '3.8'
services:
iobroker-dev:
image: marc-berg/iobnode:latest
container_name: iobroker-dev
ports:
- "2222:22"
- "8081:8081"
environment:
- GIT_USERNAME=Your Name
- GIT_EMAIL=your.email@example.com
volumes:
- ./workspace:/workspace
- ~/.ssh/id_rsa.pub:/root/.ssh/authorized_keys:ro
restart: unless-stoppedgit clone https://github.com/Marc-Berg/iobnode.git
cd iobnode
docker build -t marc-berg/iobnode .| Variable | Description | Required |
|---|---|---|
GIT_USERNAME |
Git username for commits | Yes |
GIT_EMAIL |
Git email for commits | Yes |
-
Generate SSH key (if you don’t have one):
ssh-keygen -t rsa -b 4096 -C "your.email@example.com" -
Mount public key:
-v ~/.ssh/id_rsa.pub:/root/.ssh/authorized_keys:ro -
Connect via SSH:
ssh -p 2222 root@localhost
docker run -d --name iobroker-dev \
-p 2222:22 -p 8081:8081 \
-e GIT_USERNAME="Developer Name" \
-e GIT_EMAIL="dev@example.com" \
-v $(pwd)/projects:/workspace \
marc-berg/iobnodessh -p 2222 root@localhost# Inside the container
cd /workspace
mkdir my-adapter
cd my-adapter
# Start ioBroker Dev-Server
iobroker-devOpen http://localhost:8081 in your browser to access the ioBroker development interface.
The installed @iobroker/dev-server provides:
# Start dev server
iobroker-dev start
# Start with specific port
iobroker-dev start --port 8081
# Start in debug mode
iobroker-dev start --debug
# Install adapter
iobroker-dev add adapter-name
# View logs
iobroker-dev logsproject-root/
├── workspace/ # Main development folder
│ ├── adapters/ # Adapter projects
│ ├── scripts/ # Development scripts
│ └── configs/ # Configuration files
├── ssh-keys/ # SSH keys
└── docker-compose.yml
volumes:
- ./workspace:/workspace # Development folder
- ./ssh-keys/authorized_keys:/root/.ssh/authorized_keys:ro
- ./configs:/etc/iobroker:ro # Optional configurations-
Install “Remote - SSH” extension
-
Add SSH configuration:
Host iobroker-dev HostName localhost Port 2222 User root -
Connect to container
- Manage containers directly from VS Code
- Access logs and terminal
- File system browser
- Use SSH remote development
- Docker plugin for container management
# Check SSH logs
docker logs iobroker-dev
# Check SSH service in container
docker exec iobroker-dev ps aux | grep ssh# Set manually
docker exec iobroker-dev git config --global user.name "Name"
docker exec iobroker-dev git config --global user.email "email@example.com"# Check Node.js version
docker exec iobroker-dev node --version
# Clear npm cache
docker exec iobroker-dev npm cache clean --force# Start container as specific user
docker run --user 1000:1000 ...
# Fix permissions
docker exec iobroker-dev chown -R node:node /workspace# View container logs
docker logs -f iobroker-dev
# Enter container
docker exec -it iobroker-dev /bin/bash
# Check processes
docker exec iobroker-dev ps aux
# Network status
docker exec iobroker-dev netstat -tlnpname: ioBroker Adapter Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
iobroker-dev:
image: marc-berg/iobnode:latest
ports:
- 8081:8081
env:
GIT_USERNAME: CI
GIT_EMAIL: ci@example.com
steps:
- uses: actions/checkout@v2
- name: Test Adapter
run: |
npm test# Pull new image
docker pull marc-berg/iobnode:latest
# Recreate container
docker stop iobroker-dev
docker rm iobroker-dev
docker run -d --name iobroker-dev ... # with same parameters# Backup workspace
tar -czf workspace-backup.tar.gz workspace/
# Backup container volumes
docker run --rm -v iobroker-dev-data:/data -v $(pwd):/backup \
ubuntu tar czf /backup/container-backup.tar.gz /dataworkspace/
├── my-adapter/
│ ├── src/
│ ├── test/
│ ├── package.json
│ └── README.md
├── shared-libs/
└── docs/
# Create feature branch
git checkout -b feature/new-feature
# Regular commits
git add .
git commit -m "feat: add new feature"
# Push to remote
git push origin feature/new-feature# Unit tests
npm test
# Integration tests with dev server
iobroker-dev test
# Linting
npm run lintThe Dockerfile implements:
- Base Setup: Debian Bookworm Slim
- Node.js Installation: Secure verification with GPG
- Yarn Installation: Package manager for better dependency management
- Development Tools: Compilers and Git tools
- ioBroker Dev-Server: Global installation
- SSH Configuration: Remote access setup
- Entrypoint Script: Automated configuration
- ioBroker Forum: forum.iobroker.net
- ioBroker Discord: Developer community
- GitHub: github.com/ioBroker
- Adapter Development: ioBroker Developer Portal
- API Reference: ioBroker Core Documentation
- Best Practices: Community Guidelines
- Pull requests for improvements
- Issue reports for bugs
- Documentation updates
- Testing and feedback
This project follows open-source principles. Contributions are welcome via pull requests, issue reports, documentation improvements, and testing feedback.
This Docker image enables a professional ioBroker development environment with all necessary tools for modern adapter development.