devcontainers / devcontainers/features

Nix feature fails to install with Podman

Offen
#299 5 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
bug external
Vorherrschende Sprache
Shell
Sterne
1.5k
Forks
621
Ø Merge
6 T. 53 Min.
Gemergte PRs (30 T.)
9

Beschreibung

I'm using the VSCode Dev Containers extension on Linux with Podman and the following `devcontainer.json` file

```json
{
"name": "Ubuntu",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/nix:1": {}
}
}
```
Everything looks like it's working as expected until nix tries to bootstrap itself and fails with the error `error: cannot set host name: Operation not permitted`.

I've included some of the log output below for context, but I can't see any more information that's useful - any ideas how I could pass `--show-trace` to Nix?
```
[2022-11-17T00:40:46.659Z] ---- sudo execution ------------------------------------------------------------
I am executing:

$ sudo HOME=/root /nix/store/xdlpraypxdimjyfrr4k06narrv8nmfgh-nix-2.11.1/bin/nix-env -i /nix/store/xdlpraypxdimjyfrr4k06narrv8nmfgh-nix-2.11.1

to install a bootstrapping Nix in to the default profile

[2022-11-17T00:40:46.711Z] installing 'nix-2.11.1'
[2022-11-17T00:40:46.728Z] error: cannot set host name: Operation not permitted
(use '--show-trace' to show detailed location information)
[2022-11-17T00:40:46.738Z]
[2022-11-17T00:40:46.739Z] ---- oh no! --------------------------------------------------------------------
[2022-11-17T00:40:46.740Z] Jeeze, something went wrong. If you can take all the output and open
an issue, we'd love to fix the problem so nobody else has this issue.

:(
[2022-11-17T00:40:46.741Z]
[2022-11-17T00:40:46.741Z]
[2022-11-17T00:40:46.742Z] We'd love to help if you need it.

You can open an issue at https://github.com/nixos/nix/issues

Or feel free to contact the team:
- Matrix: #nix:nixos.org
- IRC: in #nixos on irc.libera.chat
- twitter: @nixos_org
- forum: https://discourse.nixos.org
```
I've tried both the single and multi user install options with the same result.

Is Podman supported? I'm only assuming it is since the Dev Containers extension picked it up without any input from me.

I'm new to both Nix and Dev Containers in general, so apologies if I'm missing something obvious!

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.