devcontainers / devcontainers/features
Nix feature fails to install with Podman
- 主要言語
- Shell
- スター
- 1.5k
- フォーク
- 621
- 平均マージ
- 6日 53分
- マージ済み PR(30日)
- 9
説明
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!
コントリビューションガイド
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- linux
- 領域
- devops
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100