Make bash shell as default in Docker Healthcheck command
Budget: €8 – €30 EUR
I have a yaml file for docker compose where I use Healthcheck feature as follows:
healthcheck:
test: ["CMD-SHELL", "bash -c 'source ABC.sh && XYZ topic list | grep -o 'XXX' || exit 1'"]
interval: 2s
timeout: 30s
retries: 10
start_period: 10s
How can I get rid of ["CMD-SHELL", "bash -c
so that the code looks like i.e. bash is the default shell in container :
test: source ABC.sh && XYZ topic list | grep -o 'XXX' || exit 1
interval: 2s
timeout: 30s
retries: 10
start_period: 10s
healthcheck:
test: ["CMD-SHELL", "bash -c 'source ABC.sh && XYZ topic list | grep -o 'XXX' || exit 1'"]
interval: 2s
timeout: 30s
retries: 10
start_period: 10s
How can I get rid of ["CMD-SHELL", "bash -c
so that the code looks like i.e. bash is the default shell in container :
test: source ABC.sh && XYZ topic list | grep -o 'XXX' || exit 1
interval: 2s
timeout: 30s
retries: 10
start_period: 10s