Sometimes I get an error:
chmod +x a.sh
./a.sh
Error
a.sh: /bin/bash: bad interpreter: Text file busy
I figured out the solutions was to add a sleep between the two lines:
- https://github.com/moby/moby/issues/9547#issuecomment-77547893
- https://discuss.circleci.com/t/moving-then-executing-script-in-dockerfile-causes-text-file-busy-error/14583
BUT the problem is I am not able to re-create the issue which makes the text file busy. I basically want to
- Simulate the "busy file" error 10 times
- Add fix
- Ensure the fix works
a.sh
is up to you unless you, at the least, show us the contents of that script. – Rinzwind Jul 19 '18 at 10:43