I want to build a full version of Ubuntu 14 desktop as the base image for gui applications, I know how to build on the Ubuntu desktop version by the debootstrap, as described in https://docs.docker.com/articles/baseimages/, but that is a minimal Linux version and some GUI application cannot run perfectly, because there are some basic components missing, such as a font family, so I want the full control of a basic image, thanks!
-
Possible duplicate of [How to open Ubuntu GUI inside a Docker image](https://stackoverflow.com/questions/40658095/how-to-open-ubuntu-gui-inside-a-docker-image) – Ciro Santilli OurBigBook.com Aug 24 '19 at 09:19
2 Answers
fcwu/docker-ubuntu-vnc-desktop
https://github.com/fcwu/docker-ubuntu-vnc-desktop provides a convenient setup:
docker run --name ubvnc -p 6080:80 -p 5900:5900 dorowu/ubuntu-desktop-lxde-vnc:bionic
Then either:
visit: http://127.0.0.1:6080/#/ which runs a noVNC more limited JavaScript VNC client
run:
sudo apt-get install tigervnc-viewer xtigervncviewer :5900
Then inside
vinagre
, you might want to go into full screen mode to be able to see the full desktopI also tried
vinagre
, but it was much laggier when scrolling Firefox on YouTube.
To quit just kill docker
on the terminal. And to restart the machine
docker start ubvnc
and then reconnect with VNC. Then to quit the machine:
docker stop ubvnc
You have to wait a few seconds for the VNC server on the guest to start before you can connect.
Chromium won't start from the menu. If you try to launch it from the command line it explains why:
Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Firefox does not care however.
TODO: no audio. --device /dev/snd
did not help:
- How to play sound in a docker container
- https://forums.docker.com/t/how-to-get-sound/36527
- https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/49
See also:
Tested on Ubuntu 19.04 host, fcwu/docker-ubuntu-vnc-desktop
, dorowu/ubuntu-desktop-lxde-vnc
image id: 70516b87e92d.

- 347,512
- 102
- 1,199
- 985
-
Any idea why I would get this error? standard_init_linux.go:187: exec user process caused "exec format error" – wbt11a Jul 25 '21 at 21:42
-
@wbt11a sorry, haven't met that before, I'd look at: https://stackoverflow.com/questions/51508150/standard-init-linux-go190-exec-user-process-caused-no-such-file-or-directory especially windows specifics if it's your case. – Ciro Santilli OurBigBook.com Jul 25 '21 at 21:48
I don't see the benefits of it, but impossible n'est pas français (impossible isn't French).
Docker Desktop is a way that will give you an X11 server to connect on using SSH.
This Dockerfile creates a docker image and once it's executed it creates a container that runs X11 and SSH services. The ssh is used to forward X11 and provide you encrypted data communication between the docker container and your local machine.

- 4,305
- 1
- 30
- 49