#unable to find user root: invalid argument

1 messages · Page 1 of 1 (latest)

drowsy stream
#

when I launch my action with dagger, I get this error and I don't know how to fix it. If anyone has already encountered this error, I've updated my version of dagger but the problem persists.

fluid spoke
#

@drowsy stream does your pipeline use WithUser by any chance?

drowsy stream
#

yes, i use withUser("root")

#

when I try any command withExec I automatically get this error, even a “whoami” returns this error

fluid spoke
#

in that case it's very likely that the base image you're running your witUser from doesn't have the user root?

drowsy stream
drowsy stream
#

I think the problem comes from the mapping between docker and dagger

drowsy stream
#

I don't know how to resolve it

narrow flint
#

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

drowsy stream
#

i'm a real beginner in dagger and my code isn't very clean sorry 😅

narrow flint
#

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

drowsy stream
#

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

narrow flint
#

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

drowsy stream
#

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.

narrow flint
#

should the path for that command be > company/android/local.properties? (missing company)?