Posts tagged "guix":
Docker container points to the wrong runc after a reconfigure in GNU GUIX
About a couple of years ago, I decided to try GNU GUIX as my main linux distribution. This came with a significant learning curve, which tested my patience multiple times, as I had to solve problems that in other distributions are not that common. This post is about one of these problems which I encountered recently, where a docker container stopped working after invoking the reconfigure command in GUIX to update my system.
The solution to the problem is not mine, in fact, it was posted as an issue in the GUIX issue tracker a few years ago; however, I had to make a tiny change to make it work on my end.
As soon as I tried to restart the docker container after reconfiguring my system I got an error that was similar to this (taken from the issue above):
Unknown runtime specified /gnu/store/jx64b4nnh6yvsbp117bfjc5spqz0jfq5-runc-1.0.0-rc6/sbin/runc
which seems to indicate that the container keeps the links to a specific version of runc that is different to the one being used by the current/updated Docker instance. The solution is to find the following file:
/var/lib/docker/containers/<container-hash-goes-here>/hostconfig.json
and edit it to use the same version of runc that is installed in GUIX. One quick way to find out what packages are currently installed is to call
guix package -I
As a final step, we need to run the following command:
sudo herd restart dockerd
this will allow the old containers to run again. The issue that describes the original fix mentions that the hostconfig.json
file could be located in
/var/run/docker/containers/<container-hash-goes-here>
whereas in my case the file was in:
/var/lib/docker/containers/<container-hash-goes-here>
Hopefully this will help others having the same problem.