I have an image - which is exporting some metrics of the app once it is ready - that I need to deploy as sidecar on Openshift.
The issue is that, to be ready the app takes some time and in the meantime it would restart few times before being ready leading the deployment to be in a crashing status for a few minutes which is unacceptable. To overcome this, I thought about overriding the entrypoint of the sidecar by adding a sleep.
command: ["/bin/sh"]
args: ["-c", "sleep 20"]
But the sidecar image does not have an sh binary:
stat /bin/sh: no such file or directory
And if I try to add it, I get a permission denied error.
exec /bin/sh: permission denied
I've tried also adding executable permission, running as root and adding libraries to the image, nothing works.
Dockerfile:
FROM nginx-unprivileged AS os-tools
COPY --from=os-tools /bin/sh
COPY --from=os-tools /lib/x86_64-linux-gnu...