Run a command from one container to another using the network in docker-compose file

Hello,

I need to configure a vault container without overriding the normal behavior so i can’t use entrypoint or command directly in the container. My idea is to do it by using another client container which will connect to the vault container and run the configuration script.

So my question is how can i run a shell script from one container inside another that are connected with the same network in a docker-compose file ?

Thank you,