This image is intended to be used for displaying x11 applications from container in a browser.
- Base image oraclelinux:7-slim
FYI https://github.com/rlagutinhub/docker_swarm-mode.novnc-internal-url
- xvfb - x11 in a virtual framebuffer
- x11vnc - a VNC server that scrapes the above X11 server
- noVNC - a HTML5 canvas vnc viewer
- fluxbox - a small window manager
- conky - light-weight system monitor for X
- xterm - to demo that it works
- firefox - web browser developed by the Mozilla Foundation
- supervisord - to keep it all running
Build image:
docker build -f Dockerfile -t docker.novnc .
You can specify the following variables:
DISPLAY_WIDTH=<width>
(1024)DISPLAY_HEIGHT=<height>
(768)VNC_PASS=<password>
(passw0rd)
Run with default settings:
docker run -it --rm \
--shm-size 256m \
--stop-timeout 60 \
--name vnc \
--network bridge \
-p 6080:6080/tcp \
docker.novnc:latest
Run with custom settings:
docker run -dit \
--shm-size 256m \
--stop-timeout 60 \
-e "DISPLAY_WIDTH=1920" \
-e "DISPLAY_HEIGHT=899" \
-e "VNC_PASS=123456" \
--name vnc \
--network=bridge \
-p 6080:6080/tcp \
docker.novnc:latest
Run with custom settings:
docker-compose -f docker-compose.yml -p "vnc" up --build -d
docker-compose -f docker-compose.yml -p "vnc" ps
docker-compose -f docker-compose.yml -p "vnc" stop
docker-compose -f docker-compose.yml -p "vnc" rm
version: '3.7'
services:
vnc:
image: docker.novnc:latest
container_name: vnc
shm_size: 256mb
stop_grace_period: 1m
network_mode: bridge
# restart: always
environment:
- DISPLAY_WIDTH=1920
- DISPLAY_HEIGHT=899
- VNC_PASS=123456
ports:
- 6080:6080/tcp
Open a browser and see the xterm
and firefox
demo at http://<server>:6080
- DockerHub rlagutinhub/docker.novnc
- GitHub rlagutinhub/docker.novnc