A lightweight, ready-to-use Kali Linux desktop environment with VNC and web-based noVNC access.
1.9K
A lightweight Docker container running Kali Linux with a complete desktop environment accessible via VNC and noVNC for browser-based remote access.
# Build and start the container
docker-compose up --build
# Run in background
docker-compose up -d
# Stop the container
docker-compose down
# Build the container
docker build -t kali .
# Run the container
docker run --rm -it --name kali -p 9020:8080 -p 9021:5900 kali
Open your web browser and navigate to:
https://localhost:9020/vnc.html
Default VNC password: kali
| Variable | Default | Description |
|---|---|---|
VNCEXPOSE | 0 | Set to 1 to expose VNC port for external clients |
VNCPORT | 5900 | VNC server port within container |
VNCPWD | kali | VNC authentication password |
VNCDISPLAY | 2560x1440 | Desktop resolution |
VNCDEPTH | 16 | Color depth (8, 16, 24, or 32) |
NOVNCPORT | 8080 | noVNC web server port within container |
Create or modify docker-compose.yml:
version: '3.8'
services:
kali:
build: .
container_name: kali
ports:
- "9020:8080"
- "9021:5900"
environment:
- VNCEXPOSE=1
- VNCPWD=mypassword
- VNCDISPLAY=1920x1080
- VNCDEPTH=24
docker run -it --rm \
-p 9020:8080 \
-p 9021:5900 \
-e VNCEXPOSE=1 \
-e VNCPWD=mypassword \
-e VNCDISPLAY=1920x1080 \
-e VNCDEPTH=24 \
kali
Access via noVNC web interface at https://localhost:9020/vnc.html
For traditional VNC client access:
VNCEXPOSE=1 in your configurationlocalhost:9021kali)Modify the KALI_DESKTOP argument in the Dockerfile:
xfce (default)mategnomekdeUpdate the KALI_METAPACKAGE argument in the Dockerfile:
core - Essential tools onlydefault - Standard Kali toolslight - Lightweight selectionlarge - Extended tool collectioneverything - Complete tool suitetop10 - Most popular tools (default)For more information about metapackages, visit the official Kali documentation.
The container automatically generates self-signed certificates for SSL/TLS encryption.
Mount your own certificates using volumes:
-v /path/to/cert.pem:/etc/ssl/certs/novnc_cert.pem \
-v /path/to/key.pem:/etc/ssl/private/novnc_key.pem
Generate new certificates:
openssl req -new -x509 -days 365 -nodes \
-out cert.pem -keyout key.pem \
-subj "/C=US/ST=State/L=City/O=Organization/CN=localhost"
docker psBrowser certificate warnings are normal with self-signed certificates. You can:
VNCDEPTH for slower connectionsVNCDISPLAY resolution for better performancePre-built images are available at: pushpenderindia
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions:
Content type
Image
Digest
sha256:eef8f41c0…
Size
2.3 GB
Last updated
about 1 year ago
docker pull pushpenderindia/kali-linux-novnc