Create a docker image to Cantor
Closed, ResolvedPublic


@rgomes presented during LaKademy 2016 a prototype version of a Docker image to run Cantor. It is insteresting and there is potential to use it as a tool for users and contributors.

@rgomes let's work to provide it. :)

Yeah! Take a look in my first Dockerfile

Thanks @rgomes, that is very nice! :)

I would like to suggest the follow idea to the Dockerfile:

Add options to download a set of specific backends or all backends. For instance, Cantor has 10 backends currently, the user/contributor could select the download of only one backend, just a few, or all of them. Currently Cantor has the follow backends:

  • KAlgebra;
  • Lua;
  • Maxima;
  • Octave;
  • Python 2;
  • Python 3;
  • Qalculate;
  • R;
  • Sage;
  • Scilab.

So for each backend the Docker script can to download only those specific dependencies for that backend.

That do you think?

I changed to accept build argument

To build that:

docker build --build-arg backend="octave python" -t cantor .

Hi @rgomes your Dockerfile is ok for a first version. Can you push it to Cantor repository? You must to create a diff file in Differential so I can to review and accept the contribution.

I have an idea to improve it in a next version, what do you think? I would like to inform the user about the options of backend installations, maybe printing the options after run docker. Like:

Select the backends to installation:

  • all (All backends)
  • kalgebra (KAlgebra)
  • luajit2 (Lua)
  • maxima (Maxima)
  • ...

So if the user select 'all' the process will install all backends; if the user select 'kalgebra luajit2', the process will install KAlgebra and Lua.

Anyway, you need to list which is the package name for each backend.

I liked your idea! We can create a bash script or another stuff to ask it to user and use docker with specific "string" in build-args :)

I will read more how to do that "diff file" here :)

In T2760#39837, @rgomes wrote:

I will read more how to do that "diff file" here :)

You must to add the dockerfile to your local Cantor repository using the commands of git. After it, you can to create a diff.

Put the diff file in Differential and set the repository and reviewers to Cantor.

If you have some doubt we can chat on IRC.

Hi @rgomes, let's to finish this feature until July 21? I would like to release it officially together with Cantor 16.08.

Hi @rgomes, do you have interest/time to complete this task? If no, in order to manage correctly the Cantor tasks, I will move this task back to To-Do status and drop you from here.

I will wait some reply until May 1.


I have a docker already setup to do that, may finish this implementation tomorrow.

Nice @patrickelectric. Could you please provide some infos about how to build Cantor with your approach?

@gomex do you would like to provide some suggestion about this?

patrickelectric added a comment.EditedMay 3 2017, 12:06 AM

I am in the airport right now, but you just need to run docker with the package name and the command to run
Something like:

  • docker run -e REPO=cantor kde cantor

To work over cantor.

  • docker run -e REPO=cantor kde bash


A simple KDE application docker

How to run:
docker pull patrickelectric/kde
docker run -ti --rm -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev:/dev -e DISPLAY -e REPO="atcore" kde AtCoreTest
docker run -ti --rm -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev:/dev -e DISPLAY -e REPO="cantor" kde cantor
docker run -ti --rm -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev:/dev -e DISPLAY -e REPO="KDE_PROJECT" kde EXECUTABLE

Hello @patrickelectric, just to ask you, is it working correctly right? Do you think in propose it as an "official" solution provide by KDE?

@filipesaraiva Sorry I never responded to this! It's working without problem. This docker is a script over the kdesrc-build, it will run anything that kdesrc-build is able to compile :)

filipesaraiva closed this task as Resolved.Oct 16 2017, 2:39 PM
filipesaraiva moved this task from Work in Progress to Done on the Cantor board.

So, nice! Thanks!