Conversation

Jarkko Sakkinen

Edited 1 year ago

Each build seems to get a new #BTRFS subvolume at /var/lib/docker/btrfs/subvolumes. This will overtime exhaust the whole root file system. In order to disable this behavior, create /etc/docker/daemon.json with the contents:

{
    "storage-driver": "overlay2"
}

I did not know this and neither could login to my system through GDM nor console. Luckily SSH login worked and I could delete all over 800 GB of subvolumes.

IMHO, objectively the default settings in #Docker are the worst ever.

1
0
1

Jarkko Sakkinen

Edited 1 year ago
This is completely bogus behavior because for any software package the defaults should not depend on the file system it is running top of. It should opt-in feature.
1
0
0
@ikkeT I might switch later on but since Docker was used as a starting point, I'll use it for the time being.
1
0
1

Jarkko Sakkinen

Edited 1 year ago

@ikkeT did the switch to podman as the same build command-line and Dockerfile did not cause issues. Just wanted be cautious at first :-)

Apparently these also got pre-created (probably) by Debian package’s post-install script:

$ cat /etc/sub{uid,gid}
jarkko:100000:65536
jarkko:100000:65536

This is the first time in my life when I’m pro-actively using containers in my work so better to be still somewhat conservative in choices and take babysteps :-) Although it gives some lift that I know what naemspaces and cgroups are, and how they work.

1
0
1
@ikkeT a major caveat in podman is that it seems to produce a pile of intermediate images (?) that i do not have use and have to clean up after build.
0
0
1
@ikkeT I would actually want to know that if I ask to build an image why I get the image yes but also ton of image's without tags :-) Pruning would mask the problem.
1
0
0
@ikkeT i like `podman-unshare` command
0
0
1

Jarkko Sakkinen

Edited 1 year ago

@ikkeT After searching I think I found a solution: export BUILDAH_LAYERS=false

1
0
1
@ikkeT did the trick:

```
$ podman images -qa
de5f96374006
6df894023726
```

Two is expected: docker.io/library/ubuntu:20.04 + R&D image. I don't really have opinions on container languages tbh :-) I use docker format because it is used by the keystone project. podman-unshare is just useful tool for what I do sometimes.
1
0
1
@ikkeT I also have one use case where Docker is the only thing that I know works. I've spun off TPM2 TSS test suite with Docker on RISC-V environment which is bootstrapped with #Buildroot image. If I recall correctly for RISC-V LXC does not work at all and for a reason unknown to me BR2_PACKAGE_PODMAN does not exist at all.
0
0
1

Jarkko Sakkinen

Edited 1 year ago
@panda tbh, making system a brick for the sake of performance optimization is malicious behavior by definition. OK it was almost a brick, i could luckily still access SSH and did not have to start burning a USB stick just to boot up my system :-) Full workday wasted on total nonsense.

This would only make sense if you could optionally enable whatever it was doing for BTRFS because then you would know. Now it comes as a surprise, and not nice one for someone like me who had to use Docker for the 1st time in their life.
0
1
0
@panda it was no longer possible to run that command because there was no enough disk space to run it, so the whole mess ended up into a race condition with the disk usage. Super bad software design Docker has IMHO.
1
0
0
@panda I get the features in the sense that they exist but not in the sense that they are defaults :-) I mean it is less of a harm to tune the performance later on than accidentally brick your computer. Especially this is somewhat nasty experience for someone like me who does not otherwise care about containers but has to drive-by-use given the project requirements or whatever.
0
0
1
@panda ya, I learned that rough way but at least it is hard to forget it now :-) thanks anyway for good commentary!
0
0
1