Starting cockroachDB

How to start cockroachDB service. I tried doing:
services:

  • name: cockroach
    image: cockroach
    commands:
    • echo cockroachDB initialized

But it is not working

when you specify a commands section it is overriding the image entrypoint with your custom shell commands [1], thus preventing cockroach db from starting. If you want to ping or interact with cockroach you should do so from a separate step / container as demonstrated in many of the example pipelines [2][3][4][5].

[1] https://docs.drone.io/pipeline/docker/syntax/steps/#commands
[2] https://docs.drone.io/pipeline/docker/examples/
[3] https://docs.drone.io/pipeline/docker/examples/services/redis/
[4] https://docs.drone.io/pipeline/docker/examples/services/mysql/
[5] https://docs.drone.io/pipeline/docker/examples/services/mongo/