#unable to find user root: invalid argument
1 messages · Page 1 of 1 (latest)
@drowsy stream does your pipeline use WithUser by any chance?
yes, i use withUser("root")
when I try any command withExec I automatically get this error, even a “whoami” returns this error
in that case it's very likely that the base image you're running your witUser from doesn't have the user root?
I think the problem comes from the mapping between docker and dagger
I don't know how to resolve it
are you able to share any of your code? or a minimal repro?
dagger core container from --address=ghcr.io/cirruslabs/flutter:3.7.7 with-exec --args whoami stdout
✔ connect 2.1s
✔ inspecting core types 1.1s
✔ parsing command line arguments 0.0s
✔ container: Container! 0.0s
✔ Container.from(address: "ghcr.io/cirruslabs/flutter:3.7.7"): Container! 0.8s
✔ Container.withExec(args: ["whoami"]): Container! 1.2s
✔ Container.stdout: String! 1m20.3s
Full trace at https://dagger.cloud/kpenfound/traces/8736530dce72e39d39c5259e48214283
root
i use the typescript sdk
i'm a real beginner in dagger and my code isn't very clean sorry 😅
Looks fine to me 🙂 Does it behave the same without the withUser("root")? Just wondering because root is already the default for the container. I don't know how that would make a difference though
yes, I get this error even without withUser(“root”), this action doesn't change anything, i think my setup of dagger isn't correct but i follow the installation page
ok so this was kind of a sneaky error 😂 Change the .withMountedDirectory("./", src) to .withMountedDirectory("/src", src). Since you're setting the withWorkdir after that command, it's actually applying the input directory to / which I think is basically wiping the original filesystem
your pipeline has terminated, I no longer have the root error but it doesn't want to run my cat and I have no further details apart from that,
Thank you very much for your time.
should the path for that command be > company/android/local.properties? (missing company)?