为什么需要?
在尝试Mac系统vcpkg中安装qt5失败之后,考虑到用docker安装Ubuntu,能不能在docker中运行GUI程序呢?
没有做不到,只有想不到。
如何实现?
GitHub - fcwu/docker-ubuntu-vnc-desktop: A Docker image to provide web VNC interface to access Ubuntu LXDE/LxQT desktop environment.
sudo docker run --name ubvnc -p 6080:80 -p 5900:5900 dorowu/ubuntu-desktop-lxde-vnc:bionic
改进
还是docker-compose.yml方便
version: '3.3'
services:
ubuntu-desktop-lxde-vnc:
container_name: ubvnc
ports:
- '6080:80'
- '5901:5900'
- '8888-8898:8888-8898'
volumes:
- './:/root'
- '/dev/shm:/dev/shm'
environment:
- HTTP_PASSWORD=password
- VNC_PASSWORD=password
- RESOLUTION=1600x900
image: 'dorowu/ubuntu-desktop-lxde-vnc:bionic'
docker-compose up -d
结果
?
|