poniedziałek, 3 lipca 2017

docker "/usr/bin/env: bad interpreter: Text file busy"

Today I faced the following error while trying to init my docker container.

Here you are the content of the script running as a part of the entrypoint commands chain

!#/usr/bin/env bash

chmod +x /my-script.sh && /my-script.sh run
It seems that the /my-script.sh file modification is still ongoing whilst we try to run it. The solution is to force system to flush buffers before using the file. Sync command is what we need.
!#/usr/bin/env bash

chmod +x /my-script.sh && sync && /my-script.sh run

Brak komentarzy:

Prześlij komentarz