Build instructions ambiguous, need help. Linux

I’m on Linux Mint following Building Krita with Docker on Linux — Krita Manual 5.3.0 documentation

Succeeded through the following:

sudo apt install docker.io
sudo systemctl stop docker # gave a warning to reload-daemon, I then did.

# Created file /etc/docker/daemon.json with this after confirming my Ubuntu version is 24.04, higher than the example for "newer systems".
{
    "data-root" : "/home/eve/Desktop/Coding/dockerimages"
}

sudo systemctl start docker
sudo apt install python3 python3-venv python3-pip wget

It’s in downloading the Krita source that it became unclear. There’s use of “krita-auto-1”. I’m not sure why it’s called krita-auto-1, elaboration would be very helpful but I did it anyway up to:

# copy/checkout Krita sources to 'persistent/krita'
cp -r /path/to/sources/krita ./persistent/krita

What are the “krita sources”? The examples use relative URL syntax, so what folder am I sitting in? The paths used here are totally vague to the point I can’t figure it out. So I skipped it and

# download the deps archive
./bin/bootstrap-deps.sh

The entire /bin/ folder does not exist in the cloned krita repo nor does bootstrap-deps.sh. At this point I can’t continue further.

I’m guessing there’s some critical interaction with docker that I’m supposed to do that I’m unaware of and isn’t mentioned here. If so I highly recommend adding it to instructions – it might be basic after you know it, but every topic is an ocean until you have a boat.

If anyone has answers, please help! Thank you

From reading the instructions

# create directory structure for container control directory
git clone https://invent.kde.org/dkazakov/krita-docker-env krita-auto-1

“krita-auto-1” is just the name of the folder the krita-docker-env repo goes into. You could probably name it whatever you want, unless the scripts expect that name.

cd krita-auto-1
mkdir persistent

Then you make that folder your current directory, and make a directory inside called “persistent”.

# copy/checkout Krita sources to 'persistent/krita'
cp -r /path/to/sources/krita ./persistent/krita

“/path/to/sources/krita” isn’t meant to be a real path, rather replaced with the path to your existing Krita source code repo. You copy the existing repo to “persistent”.
Or…

## or ...
# git clone kde:krita persistent/krita
# "kde:krita" should be replaced with a link for cloning the repository,
# such as "git@invent.kde.org:graphics/krita.git".

If you didn’t download the Krita source code yet, git clone git@invent.kde.org:graphics/krita.git persistent/krita/ will do that and put it in the “persistent/krita/” folder.

# download the deps archive
./bin/bootstrap-deps.sh

. is the current directory, which earlier was set to “krita-auto-1”. The bootstrap-deps script is in the krita-docker-env repo.

Thanks for replying! You say that the bootstrap-deps script is in krita-docker-env, while you say that the current directory is krita-auto-1 or whatever I named it. But those are in different places for me, which must be the issue. They should be the same.

The failure on my part is that I did not intuit to clone the folder into the dockerimages folder (which is what I called it). That’s my assumption, is this correct? If so, that entire folder is on lockdown by the daemon process – I cannot even open or read it, so I highly doubt I could open vscode in it. There is some big rundown of Docker basics I think I’m missing, and I am at a loss. I can look it up with pointers on what topic.

Can you list all the folders that were created and what is inside of them? And where did you clone the krita-docker-env repository?

I looked at docker and know enough to think I made no mistakes yet. It’s:

persistent/
  krita/
    3rdparty/
    3rdparty_plugins/
    3rdparty_vendor/
    benchmarks/
    build-tools/
    cmake/
    dev-tools/
    krita/
    libs/
    LICENSES/
    packaging/
    pch/
    pics/
    plugins/
    po/
    qmlmodules/
    sdk/
    winquirks/
    .git/
    .github/
    .gitlab/
    .vscode/
    ... several files ...

That’s the direct results of git clone. There are no other artifacts created by any other process except for setting the dockerimages folder and restarting docker after pointing it to that path. This is under Coding/dockerimages/ and the above is Coding/krita/

You need to clone two repositories: one with Krita code (https://invent.kde.org/graphics/krita), and one with docker instructions ( https://invent.kde.org/dkazakov/krita-docker-env). I’m not sure if you did both. What you show me is only Krita code.

The tree should be as follows:

krita-auto-1    [content cloned from krita-docker-env repository]
          bin/
          data/
          default-home/
          persistent/ 
                    krita/     [content cloned from krita repository]
                         3rdparty/
                         3rdparty_plugins/
                         ....
          log/
          ubuntu-focal/
          user-hooks.d/

EDIT:

The . folder is the krita-auto-1 folder, and the ./bin/ folder is the one in the krita-docker-env repository, not the Krita source code one.

Also if you cloned it in a wrong place, just clone it again. Potentially remove it from the wrong place as well if you don’t want to waste space, even though you might need to use root access (though I’d be pretty careful in that case).

Docker can’t un/install properly anymore…I always get one shot and then the computer env is perma-borked, and >1 year later on a fresh OS install is next time I get to try. This was attempt 4. I might need a VM :upside_down_face:

You don’t need to uninstall it though? You only should make sure you have all the files in place. If docker is installed, just leave it installed. You need to clone repository, that has nothing to do with docker on your system. If it’s all botched in this folder (possibly you did put docker images folder in it and that’s why it’s locked for you), you can create folder Coding2 and repeat the cloning…

If it’s not installed and doesn’t work, then I guess you might need a VM or something… but you can try to say what’s wrong with it, maybe it’s not that difficult to fix? (I’ve had my own share of frankensteined systems).

Thanks for the patience, I was tearing-hair mad at things and had to rewrite my comment 3 times to be more neutral :sweat_smile:. Docker is inoperable on my actual laptop, cannot uninstall or reinstall or repair. So I did go the VM route, and so far, it’s promising. I almost stubbed my toe by naming the folder krita-source because krita has a folder called that in itself, so that was a close call, but I caught it. I’m on step ./bin/bootstrap-deps.sh and waiting.

When I run ./bin/build_image, I’m getting

failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: invalid rootfs: stat /run/containerd/io.containerd.runtime.v2.task/moby/ …: no such file or directory