I have a problem using Laradock and yarn with an inline docker exec
command from "outside" the workspace
container.
When I use it from inside the workspace
container, everything is working as expected :
docker exec -it --user=laradock laradock_workspace_1 bash
yarn -v
1.3.2
When I try to use it from an inline command, here is what happens :
docker exec -it --user=laradock laradock_workspace_1 yarn -v
OCI runtime exec failed: exec failed: container_linux.go:296: starting container process caused "exec: \"yarn\": executable file not found in $PATH": unknown
Am I doing anything wrong ?
I found the solution myself.
For those who encounter the same issue, just use docker exec
following the example below, in order to get access to node or yarn :
docker exec -it --user=laradock laradock_workspace_1 bash --login -c "yarn -v"
I found the solution here : https://gitlab.com/gitlab-org/gitlab-runner/issues/82
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With