Local testing with docker

3 views
Skip to first unread message

Davide Gianforte

unread,
May 25, 2020, 7:24:20 AM5/25/20
to krusade...@googlegroups.com
Hi,

I've talked with Toni some months ago about the ability to test compile and
execution of Krusader in several distros. While a solution is to fire up many
VM, with Docker you can reach that in faster way.

There is a good article to start with:

http://www.proli.net/2017/05/23/kdevelop-runtimes-docker-and-flatpak-integration/

I followed the Docker part and I'm fine to use a pre-built image to compile
Krusader directly from KDevelop. The compile steps are pretty easy, while the
execution is a bit tricky because you have to configure xhost and .krusaderrc.

I also created a Jenkins system similar to build.kde.org where I can launch
every compile test and wait for results; the steps are very basics: grab code,
compile, publish results.

An example to create a Docker image (ubuntu-20.04-gcc.Dockerfile):

FROM ubuntu:20.04

RUN export TZ=Europe/Rome
RUN apt-get update
RUN apt-get install -y rsync ssh gettext
RUN apt-get install -y qt5-default
RUN apt-get install -y extra-cmake-modules libkf5plasma-dev libkf5kio-dev libkf5archive-dev libkf5parts-dev libkf5wallet-dev libkf5xmlgui-dev kdoctools-dev
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake ninja-build zlib1g-dev

CMD ["tail -f /dev/null"]

Those are the same steps you have to do on a brand new system. With

docker build -f ubuntu-20.04-gcc.Dockerfile -t ubuntu-20.04-gcc .

you have an up-to-date ubuntu image that you can use everywhere to test your
code.

Davide


Nikita Melnichenko

unread,
May 26, 2020, 2:23:28 AM5/26/20
to krusade...@googlegroups.com
Hi Davide,

I think it's a great initiative! It's indispensable if we want to test
changes touching krarc, kiso, theme or icon issues. This will help with
reproducing bugs and might even help with reporting bugs in case power
users could repro in a container.

Since you went deep into the details already, could you please log and
share the steps you took / will take to configure everything? I've never
run a docker with a GUI app that you can interact with, it will be a
good learning for me.

I think we care about these two things mostly:
1. Building Krusader on various platforms.
2. Testing Krusader functionality on various platforms with different
user configs.

Integration with KDevelop is nice to have but not a necessity.

We can then have a registry of docker files in our repo.

BTW, I played with Ubuntu-20.04 VM today and composed a minimal list of
packages that's needed to compile and run Krusader.

To compile:
apt-get install -y build-essential cmake extra-cmake-modules gettext
zlib1g-dev libkf5kio-dev libkf5archive-dev libkf5doctools-dev
libkf5parts-dev libkf5wallet-dev

To run (and enjoy):
apt-get install -y ktexteditor-katepart breeze-icon-theme

Thanks,
Nikita.
Reply all
Reply to author
Forward
0 new messages