I'm using containerized Vespa.ai DB, and I want to execute the following commands from the host:
- vespa-stop-services
- vespa-remove-index
- vespa-start-services
If I execute the following vespa-stop-services && vespa-remove-index && vespa-start-services
from my shell after I attach the container, it works fine. But when I use docker exec it fails.
I tried the following commands:
docker exec bash -c 'vespa-stop-services && vespa-remove-index && vespa-start-services'
docker exec bash -l 'vespa-stop-services && vespa-remove-index && vespa-start-services'
The only way I successfully managed to execute those commands, is when I execute them sequentially, which I would like to avoid:
docker exec bash -l 'vespa-stop-services'
docker exec bash -l 'vespa-remove-index'
docker exec bash -l 'vespa-start-services'
What am I doing wrong? Thanks in advance!