I can start a standalone container with this command:

sudo docker run --rm -it -p "8000:8000" -v "/home/maxou/stellar:/opt/stellar" --name stellar stellar/quickstart --standalone

I can call rest commands on horizon, and when I log into the container, I see all the processes running, supervisord shows:

root@aba039d92900:/# supervisorctl 
horizon                          RUNNING   pid 154, uptime 0:08:08
postgresql                       RUNNING   pid 152, uptime 0:08:08
stellar-core                     RUNNING   pid 153, uptime 0:08:08

I then terminate the interactive container (CTRL+C)

and launch the container in background mode:

sudo docker run -d -p "8000:8000" -v "/home/maxou/stellar:/opt/stellar"  --name stellar stellar/quickstart --standalone

Then when I try to log into it, I get a "container not running" error:

sudo docker exec -it stellar /bin/bash
Error response from daemon: Container a2d8d906f7aa52644e215f336e1099441b37090b773fe6745794afc4e0f31d6c is not running

docker ps tells me that the container exited right after starting:

sudo docker ps -a 
CONTAINER ID        IMAGE                COMMAND                  CREATED              STATUS                          PORTS               NAMES
a2d8d906f7aa        stellar/quickstart   "/init -- /start --s…"   About a minute ago   Exited (0) About a minute ago                       stellar

What is wrong ? I would like to run the container as a service, with all the stellar services always running

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.