Run custom mix task in dockerfile fails


I fail to run a custom mix task in the Dockerfile. The custom task is called in the build step where mix deps.get is available. I get the error when building the image:

`(Mix) The task “copyassets” could not be found

I can run mix copyassets in the terminal, and I can see this task with mix help.
I also tried to declare it as an alias in the mix.
Isn’t this possible?

I can overcome this by executing this task before building the image but I thought it would be better to do this programmatically.