webdevops / Dockerfile

:package: Dockerfiles from WebDevOps for PHP, Apache and Nginx
https://webdevops.io/projects/dockerfiles/
MIT License
1.67k stars 492 forks source link

limited execution time / time-out for entrypoint.d scripts? #430

Open ulukaisan opened 2 years ago

ulukaisan commented 2 years ago

Hello,

I am using the webdevops/php:7.4 image. I am putting some shell scripts into /opt/docker/provision/entrypoint.d/ to be executed only once during container startup. For example: /opt/docker/provision/entrypoint.d/99-myscript.sh

This works like a charm. However, I have one script that takes a long time to complete, because it has to unpack & copy large amounts of data. This long running script always gets terminated somewhere halfway during the unpack/copy process before it finishes.

When I execute the script manually it works fine. But during container startup, it seems to get terminated somewhere halfway.

Therefore I am wondering: Is there some kind of maximum execution time that is configured for scripts under /opt/docker/provision/entrypoint.d/ ? If there is, can I increase it?

Thanks in advance. Greetings,

-Ulukai San

htuscher commented 2 years ago

Not that I would be aware of. But there might be some limitation by docker itself.

ulukaisan @.***> schrieb am Di., 7. Dez. 2021, 16:15:

Hello,

I am using the webdevops/php:7.4 image. I am putting some shell scripts into /opt/docker/provision/entrypoint.d/ to be executed only once during container startup. For example: /opt/docker/provision/entrypoint.d/99-myscript.sh

This works like a charm. However, I have one script that takes a long time to complete, because it has to unpack & copy large amounts of data. This long running script always gets terminated somewhere halfway during the unpack/copy process before it finishes.

When I execute the script manually it works fine. But during container startup, it seems to get terminated somewhere halfway.

Therefore I am wondering: Is there some kind of maximum execution time that is configured for scripts under /opt/docker/provision/entrypoint.d/ ? If there is, can I increase it?

Thanks in advance. Greetings,

-Ulukai San

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/webdevops/Dockerfile/issues/430, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGXLBASJIZUVFDBVZ64UB3UPYQJPANCNFSM5JRQJBDQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ulukaisan commented 2 years ago

Thanks for your reaction. I didn't find where that time limitation could be configured or what the exact time-out value is. I was able to work around it by splitting up the script into multiple smaller scripts so that each of those scripts runs less long. A bit of a dirty workaround, but it works.