1

I deployed a stack to a docker cloud (cloud.docker.com not in swarm mode).

Everything is running fine but I have a postgres database. I have a separate container that contains scripts to initialize the structure of the database (I need certain tables). I only need to run this once, so I thought about executing this container in the stack.

However it doesn't seem to be possible to run a single container (the docker-cloud container commands don't have a run sub-cmnd).

Is there a way to execute one-off scripts in the stack?

leifg
  • 8,668
  • 13
  • 53
  • 79
  • You need to add another service and set autodestroy for the same. https://docs.docker.com/docker-cloud/apps/auto-destroy/#use-the-api-or-cli-1 – Tarun Lalwani Dec 24 '17 at 16:21

0 Answers0