A powerful Docker solution for running multiple Ubuntu GUI instances with VNC access. Launch up to 10 parallel Ubuntu desktop environments, each with its own XFCE4 GUI and persistent storage. Perfect for virtual labs, parallel testing, development environments, and training sessions.
- 10 independent Ubuntu desktop environments
- VNC access to each container
- Persistent storage for each container
- XFCE4 desktop environment
- Automatic container restart on failure
- Easy deployment with Docker Compose
- Docker
- Docker Compose
- VNC Viewer (like RealVNC, TigerVNC, or any VNC client)
.
├── Dockerfile
├── docker-compose.yml
├── start-vnc.sh
├── README.md
└── data/
├── vnc1/
├── vnc2/
├── ...
└── vnc10/
-
Clone the repository:
git clone <repository-url> cd <repository-name>
-
Create the required data directories:
mkdir -p data/vnc{1..10}
-
Build and start the containers:
docker-compose up -d
-
Connect to any container using a VNC viewer:
- Container 1:
localhost:5901
- Container 2:
localhost:5902
- ...
- Container 10:
localhost:5910
Default VNC password:
password
- Container 1:
Each container runs:
- Ubuntu (latest)
- XFCE4 desktop environment
- TightVNC Server
- Resolution: 1920x1080 (configurable in Dockerfile)
Container | Port |
---|---|
vnc_ubuntu1 | 5901 |
vnc_ubuntu2 | 5902 |
vnc_ubuntu3 | 5903 |
vnc_ubuntu4 | 5904 |
vnc_ubuntu5 | 5905 |
vnc_ubuntu6 | 5906 |
vnc_ubuntu7 | 5907 |
vnc_ubuntu8 | 5908 |
vnc_ubuntu9 | 5909 |
vnc_ubuntu10 | 5910 |
Each container has its own persistent storage in the data
directory:
- Container 1:
./data/vnc1
- Container 2:
./data/vnc2
- ...and so on
Start all containers:
docker-compose up -d
Stop all containers:
docker-compose down
View container logs:
docker-compose logs [container_name]
Restart a specific container:
docker-compose restart vnc1 # Replace vnc1 with desired container name
- The default VNC password is set to "password". It's recommended to change this in the Dockerfile for production use.
- VNC traffic is not encrypted by default. For production use, consider using SSH tunneling or VPN.
- Resolution can be modified in the Dockerfile (ENV RESOLUTION=1920x1080)
- Additional packages can be added to the Dockerfile
- Desktop environment settings can be modified through XFCE4 settings
-
If you can't connect to VNC:
- Ensure the ports are not being used by other applications
- Check container logs:
docker-compose logs vnc1
- Verify the container is running:
docker-compose ps
-
If the container keeps restarting:
- Check logs for errors:
docker-compose logs vnc1
- Ensure sufficient system resources are available
- Check logs for errors:
[Add your license information here]
[Add contribution guidelines if applicable]