External-check and chroot

I have found the solution for me.

The chroot needs to provide all the libraries your command needs.
For example if you use a shell script you need to have the shell itself and all its libraries.

I’ve used this article : https://www.howtogeek.com/441534/how-to-use-the-chroot-command-on-linux/

Basically, here is what I’ve done :

chr=/var/lib/haproxy
mkdir -p $chr/{bin,lib,lib64}
list="$(ldd /bin/bash | egrep -o '/lib.*\.[0-9]')"
for i in $list; do cp -v --parents "$i" "${chr}"; done
cp -v /bin/bash $chr

Then you can put your scripts in the bin directory of the chroot.