# Yugabyte Docker container Init Script

**URL:** <https://forum.yugabyte.com/t/yugabyte-docker-container-init-script/1671>\
**Category:** General\
**Created:** [July 7, 2022, 8:07pm UTC](https://forum.yugabyte.com/t/yugabyte-docker-container-init-script/1671 "2022-07-07T20:07:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![FranckPachot](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/franckpachot/32/353_2.png) [@FranckPachot](https://forum.yugabyte.com/u/FranckPachot)\
**Post date:** [July 7, 2022, 9:15pm UTC](https://forum.yugabyte.com/t/yugabyte-docker-container-init-script/1671/2 "2022-07-07T21:15:58Z")

</div>

Hi Ganesh,  
I use a side service like this for that:

```auto
  yb-demo-init:
      image: yugabytedb/yugabyte:latest
      volumes:
          - ./scripts:/home/yugabyte/scripts
      command: |
       bash -c "
        bin/ysqlsh v ON_ERROR_STOP=1 -c 'select * from yb_servers()' &&
         ./scripts/script.sh
       "
      deploy:
          restart_policy:
             condition: on-failure

```

---

_[View the full topic](https://forum.yugabyte.com/t/yugabyte-docker-container-init-script/1671)._
