I'm trying to run a few commands while building my container.
# Tried this:
variant = await variant.with_exec(["ls", "-al"])
variant = await variant.with_exec(["pip", "install", "-r", "requirements.txt"])
# And also this:
variant = await variant.with_exec(args = ["bash", "-c", "ls", "-al"], skip_entrypoint = True)
variant = await variant.with_exec(args = ["pip", "install", "-r", "requirements.txt"], skip_entrypoint = True)
Both ways of coding this (whether I overwrite the entrypoint or not), give me the expected output in the console when I run dagger run python .....
However, even though I have two with_exec that get executed successfully one after the other (command 1 being ls ... and command 2 being pip install ...), the Dagger command then fails telling me that ls (the first command) is not found.
What is going on? I don't understand. ls is successful, then pip is successful but then Dagger says that ls can't be found?? 😕