devcontainers / devcontainers/features

Nix feature fails to install with Podman

Abierto
#299 5 comentarios 1 reacción 0 asignados Ver en GitHub
bug external
Lenguaje dominante
Shell
Estrellas
1.5k
Forks
621
Merge medio
6 d 53 min
PR fusionados (30 d)
9

Descripción

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!

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start with the devcontainer.json example and reproduce the Nix feature installation using Podman on Linux, then inspect the bootstrap log around the failed nix-env command. Done means identifying whether Podman is supported and making the Nix feature install successfully, or documenting the required limitation or configuration.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
linux
Área
devops
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.