NixOS/nix

File '/dev/full' has an unsupported type in / in Docker

Open

#11 217 ouverte le 29 juil. 2024

Voir sur GitHub
 (3 commentaires) (1 réaction) (0 assignés)C++ (1 293 forks)batch import
bugerror-messagesfetchingflakesgood first issue

Métriques du dépôt

Stars
 (9 803 stars)
Métriques de merge PR
 (Merge moyen 4j 12h) (86 PRs mergées en 30 j)

Description

Describe the bug

Given this dockerfile:

FROM ubuntu:24.04

RUN apt update -y && apt install curl -y
RUN curl -sSf -L https://github.com/DeterminateSystems/nix-installer/releases/download/v0.20.2/nix-installer-x86_64-linux -o nix-installer
RUN chmod +x nix-installer
RUN ./nix-installer install linux \
  --extra-conf "sandbox = false" \
  --init none \
  --no-confirm
ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin"

# WORKDIR /workdir

COPY flake.nix .

RUN nix run

and a trivial flake.nix:

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
  };

  outputs = { self, nixpkgs }: {

    packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;

    packages.x86_64-linux.default = self.packages.x86_64-linux.hello;

  };
}

Building the docker image crashes at the nix run step with:

#11 [7/7] RUN nix run
#11 0.174 error:
#11 0.174        … while fetching the input 'path:/'
#11 0.174 
#11 0.174        error: file '/dev/full' has an unsupported type
#11 ERROR: process "/bin/sh -c nix run" did not complete successfully: exit code: 1

Setting a WORKDIR fixes this. Problem is the error message is pretty obscure.

Expected behavior

A less obscure error message.

nix-env --version output

nix-env (Nix) 2.23.3

Priorities

Add :+1: to issues you find important.

Guide contributeur