devcontainers / devcontainers/features

Nix feature fails to install with Podman

Ouverte
#299 5 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
bug external
Langage dominant
Shell
Étoiles
1.5k
Forks
622
Merge moyen
6 j 53 min
PR mergées (30 j)
9

Description

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!

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
linux
Domaine
devops
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.