Neon/Docker: Difference between revisions

From KDE Community Wiki
No edit summary
(update edition names)
(9 intermediate revisions by 7 users not shown)
Line 6: Line 6:
The above screenshot shows a computer running its normal Plasma desktop with three KDE neon Docker containers.  One is a full Plasma session of KDE neon User Edition, one is a full Plasma session of KDE neon Developer Unstable edition and one is a single app from Developer Stable edition running Okular.
The above screenshot shows a computer running its normal Plasma desktop with three KDE neon Docker containers.  One is a full Plasma session of KDE neon User Edition, one is a full Plasma session of KDE neon Developer Unstable edition and one is a single app from Developer Stable edition running Okular.


KDE neon Docker Images comes in two variants each with the same Plasma editions as our archives. [https://hub.docker.com/r/kdeneon/plasma/ Plasma images (~2GB)] come with the same software as our installable ISOs, Plasma and minimal applications. [https://hub.docker.com/r/kdeneon/all All Applications images (~4GB)] come with all applications built on KDE neon.
KDE neon Docker Images comes in two variants each with the same Plasma editions as our archives. [https://hub.docker.com/r/kdeneon/plasma/ Plasma images (~2GB)] come with the same software as our installable ISOs, Plasma and minimal applications. [https://hub.docker.com/r/kdeneon/all All Applications images (~4GB)] come with all applications built on KDE neon. Note that all applications image is outdated
 
Flavours available are: ''kdeneon/plasma:unstable'', ''kdeneon/plasma:testing'', ''kdeneon/plasma:user'', ''kdeneon/plasma:plasma'', ''kdeneon/plasma:developer'' ''kdeneon/plasma:plasma_lts'' (and the same for kdeneon/all)
Flavours available are: ''kdeneon/plasma:dev-unstable'', ''kdeneon/plasma:dev-stable'', ''kdeneon/plasma:user'', ''kdeneon/plasma:user-lts'' (and the same for kdeneon/all)


Default user is ''neon'' and password is blank. The user has password-free sudo access.
Default user is ''neon'' and password is blank. The user has password-free sudo access.
Line 17: Line 16:
sudo usermod -aG docker $(whoami)
sudo usermod -aG docker $(whoami)
newgrp docker
newgrp docker
docker pull kdeneon/plasma:dev-unstable</nowiki>}}
systemctl unmask docker.service
This will download the latest dev-unstable image from Docker Hub.
systemctl unmask docker.socket
systemctl start docker.service</nowiki>}}
 
This will download the latest unstable image from Docker Hub:
{{Input|1=<nowiki>
docker pull kdeneon/plasma:unstable</nowiki>}}


The neondocker script lets you run Neon docker images easily, this is pre-installed on recent KDE  
The neondocker or x11docker [https://github.com/mviereck/x11docker] script lets you run Neon docker images easily, this is pre-installed on recent KDE  
neon installs but works on any distro
neon installs but works on any distro


{{Input|1=<nowiki>
{{Input|1=<nowiki>
wget https://cgit.kde.org/docker-neon.git/plain/neondocker/neondocker.rb
wget https://invent.kde.org/packaging/docker-neon/-/raw/master/neondocker/neondocker.rb -O neondocker
gem install docker-api</nowiki>}}
chmod +x neondocker
sudo gem install --version '1.22.0' docker-api
sudo apt-get install ruby-dev</nowiki>}}


By default it will run a full session inside a Xephyr window.
By default it will run a full session inside a Xephyr window.
{{Input|1=<nowiki>
{{Input|1=<nowiki>
./neondocker.rb</nowiki>}}
./neondocker</nowiki>}}


Or you can tell it to run a single app
Or you can tell it to run a single app
{{Input|1=<nowiki>
{{Input|1=<nowiki>
./neondocker.rb okular</nowiki>}}
./neondocker okular</nowiki>}}


This will give you a Bash prompt, you can code as you would on your host machine and run X apps.  Type ''exit'' to quit, the ~/src directory will be preserved on your host machine.
This will give you a Bash prompt, you can code as you would on your host machine and run X apps.  Type ''exit'' to quit, the ~/src directory will be preserved on your host machine.
Line 40: Line 46:


{{Input|1=<nowiki>
{{Input|1=<nowiki>
./neondocker.rb -w</nowiki>}}
./neondocker -w</nowiki>}}
 
For the container to persist after you have closed the window add -k
To update to the latest build add  -p
To use the Neon All build which has more apps add -a
To run a different edition add -e user/user-lts/dev-stable


* For the container to persist after you have closed the window add -k
* To update to the latest build add  -p
* To use the Neon All build which has more apps add -a
* To run a different edition add -e unstable/plasma_lts
You can also commit your Docker images if you make changes you would like to come back to such as installing applications. For more information on using Docker see [https://docs.docker.com/engine/userguide/ Docker Engine user guide.]
You can also commit your Docker images if you make changes you would like to come back to such as installing applications. For more information on using Docker see [https://docs.docker.com/engine/userguide/ Docker Engine user guide.]


Line 53: Line 58:
{{Input|1=<nowiki>
{{Input|1=<nowiki>
xhost +
xhost +
docker run -ti -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/src:/home/neon/src -e DISPLAY=:0 kdeneon/plasma:dev-unstable bash</nowiki>}}
docker run -ti -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/src:/home/neon/src -e DISPLAY=:0 kdeneon/plasma:unstable bash</nowiki>}}

Revision as of 05:38, 19 January 2021

KDE neon on Docker

Do you want to test KDE applications from master without installing KDE neon Dev Unstable edition. Maybe you have Dev Unstable edition installed but want to develop on your stable branch. Maybe you like your larswm setup but wonder if Plasma is the desktop for you and are looking for an easy way to test it out. KDE neon Docker images are the solution to quickly give you access to use or develop another branch without reinstalling your system or spending hours compiling.

32111280196_9b2875a809_b.jpg The above screenshot shows a computer running its normal Plasma desktop with three KDE neon Docker containers. One is a full Plasma session of KDE neon User Edition, one is a full Plasma session of KDE neon Developer Unstable edition and one is a single app from Developer Stable edition running Okular.

KDE neon Docker Images comes in two variants each with the same Plasma editions as our archives. Plasma images (~2GB) come with the same software as our installable ISOs, Plasma and minimal applications. All Applications images (~4GB) come with all applications built on KDE neon. Note that all applications image is outdated Flavours available are: kdeneon/plasma:unstable, kdeneon/plasma:testing, kdeneon/plasma:user, kdeneon/plasma:plasma, kdeneon/plasma:developer kdeneon/plasma:plasma_lts (and the same for kdeneon/all)

Default user is neon and password is blank. The user has password-free sudo access.

To give it a try first set up Docker as you would for your distro. For Ubuntu distros that means running:

sudo apt install docker.io xserver-xephyr
sudo usermod -aG docker $(whoami)
newgrp docker
systemctl unmask docker.service
systemctl unmask docker.socket
systemctl start docker.service

This will download the latest unstable image from Docker Hub:

docker pull kdeneon/plasma:unstable

The neondocker or x11docker [1] script lets you run Neon docker images easily, this is pre-installed on recent KDE neon installs but works on any distro

wget https://invent.kde.org/packaging/docker-neon/-/raw/master/neondocker/neondocker.rb -O neondocker
chmod +x neondocker
sudo gem install --version '1.22.0' docker-api
sudo apt-get install ruby-dev

By default it will run a full session inside a Xephyr window.

./neondocker

Or you can tell it to run a single app

./neondocker okular

This will give you a Bash prompt, you can code as you would on your host machine and run X apps. Type exit to quit, the ~/src directory will be preserved on your host machine.

For a Wayland session running in a window under either X or Wayland run. (This seems to stop any more X apps running though, spooky.)

./neondocker -w
  • For the container to persist after you have closed the window add -k
  • To update to the latest build add -p
  • To use the Neon All build which has more apps add -a
  • To run a different edition add -e unstable/plasma_lts

You can also commit your Docker images if you make changes you would like to come back to such as installing applications. For more information on using Docker see Docker Engine user guide.

For an interactive session where you have access to your coding directory ~/src run

xhost +
docker run -ti -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/src:/home/neon/src -e DISPLAY=:0 kdeneon/plasma:unstable bash