Distrobox containers needing old distrobox packages/versions after an update in NixOS
- Dominant language
- Go
- Stars
- 13k
- Forks
- 541
- Avg merge
- 20h 47m
- Merged PRs (30d)
- 4
Description
**To Reproduce**
Setup a distrobox container with the following config:
```nix
{ config, pkgs, ... }:
{
programs.distrobox = {
enable = true;
enableSystemdUnit = true;
# setting
containers = {
common-ubuntu = {
additional_packages = "zoxide eza git neovim";
entry = true;
image = "ubuntu:latest";
nvidia = true;
init_hooks = [
"ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker"
"ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker-compose"
"ln -sf /usr/share/zoneinfo/Asia/Tehran /etc/localtime"
];
};
};
};
}
```
**Expected behavior**
To able to use distrobox's containers after system upgrade
**Logs**
podman logs common-ubuntu > podman.logs
[podman.log](https://github.com/user-attachments/files/25405910/podman.log)
distrobox enter --verbose common-ubuntu
[distrobox.log](https://github.com/user-attachments/files/25405973/distrobox.log)
```js
...
...
volumeMounts:
- mountPath: /etc/hostname
name: etc-hostname-host-0
readOnly: true
- mountPath: /usr/bin/entrypoint
name: nix-store-z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2-bin-distrobox-init-host-1
readOnly: true
- mountPath: /usr/bin/distrobox-host-exec
name: nix-store-z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2-bin-distrobox-host-exec-host-2
...
...
volumes:
- hostPath:
path: /etc/hostname
type: File
name: etc-hostname-host-0
- hostPath:
path: /nix/store/z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2/bin/distrobox-init
type: DirectoryOrCreate
name: nix-store-z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2-bin-distrobox-init-host-1
- hostPath:
path: /nix/store/z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2/bin/distrobox-host-exec
type: DirectoryOrCreate
name: nix-store-z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2-bin-distrobox-host-exec-host-2
...
...
- hostPath:
path: /nix/store/z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2/bin/distrobox-export
type: DirectoryOrCreate
name: nix-store-z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2-bin-distrobox-export-host-12
```
Run the commands with `--verbose` and post the log here as a file upload
Attach also the output of `podman logs` or `docker logs`, possibly with `--latest` flag
```sh
❯ ls -al $(which -a distrobox)
lrwxrwxrwx - root root 1 Jan 1970 /home/allen/.nix-profile/bin/distrobox -> /nix/store/fhvgsj70mdpr7bm0nb56n98xs8a9f9ra-home-manager-path/bin/distrobox
❯ ls -al /nix/store/fhvgsj70mdpr7bm0nb56n98xs8a9f9ra-home-manager-path/bin/distrobox
lrwxrwxrwx - root root 1 Jan 1970 /nix/store/fhvgsj70mdpr7bm0nb56n98xs8a9f9ra-home-manager-path/bin/distrobox -> /nix/store/ci91x37p3xrhynlccrfvh6pb3kwi0slv-distrobox-1.8.2.4/bin/distrobox
```
They seem to point to an older version of distrobox which doesn't exist as of upgrading my system
Contributor guide
Assessment
This issue has not been assessed yet.