Running a one off command in a docker cloud stack

194 Views Asked by At

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?

0

There are 0 best solutions below