astrophobia
astrophobia

Reputation: 889

download and run ubuntu-desktop with gnome support via docker

I am completely new to docker. I have a Redhat 7 desktop with docker installed. I now want to run a full fledged ubuntu-desktop 18.04 (including its gnome GUI) via docker. How can this be done? I have been googling for instructions/tutorials on where I can download an ubuntu 18.04 docker image (with GUI support) and run it, but surprisingly I cannot find anything. Can someone help me? Thanks.

Upvotes: 6

Views: 10303

Answers (2)

maxm
maxm

Reputation: 3667

This is an atypical use case for Docker. Docker is normally used to run applications via the command line, or on a server without GUI support. Most operating systems in docker images ship without GUI support.

However, you can enable GUI support with X11. Only with containers that support it though, and not with Ubuntu as far as I can tell. More details on this blog post: https://blog.jessfraz.com/post/docker-containers-on-the-desktop/

For now, just run docker run -it --rm ubuntu:latest bash and you'll launch an Ubuntu 18.04 shell (at the time of this post).

Upvotes: 2

Stefan
Stefan

Reputation: 12360

I have a different situation, where I run docker on a Windows10 platform. I also tried to install Gnome for some Ubuntu image and start a gnome-session from the terminal. I did not manage to do so.

My current solution is to use Mate instead of Gnome. Maybe my steps are helpful for others that just started with docker:

docker run -it -e DISPLAY=192.111.999.9:0.0 --privileged --name=ubuntu ubuntu

  • You should then see a linux prompt

  • Update the package-manager and upgrade existing packages:

apt-get update
apt-get upgrade -y
apt-get update

dbus-uuidgen > /var/lib/dbus/machine-id
mkdir -p /var/run/dbus
dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address

  • install mate (and some themes to avoid theme warning)

apt-get install mate-desktop-environment -y
apt-get ubuntu-mate-themes -y

  • start a Desktop session with

mate-session

Good luck!

(If you want some more programs, instead of "mate-desktop-environment", you can also use the larger package "ubuntu-mate-desktop". Will take > 10 min to be installed.)

Upvotes: 4

Related Questions