Docker Community Forums

Share and learn in the Docker community.

Download volume data tutorial failure: Container exits prematurely


(Robertteamnow) #1

I’m trying to follow the tutorial in order to backup volume data from an existing container as documented here:

https://docs.docker.com/docker-cloud/tutorials/download-volume-data/

However, when running the first command the ubuntu image exits immediately with exit code 0:

docker-cloud service run -n downloader -p 22:2222 -e AUTHORIZED_KEYS="$(cat ~/.ssh/id_rsa.pub)" --volumes-from mysql ubuntu

Even if I remove the additional parameters I can’t get an ubuntu or even a busybox instance to stay up and running. (i.e. this also exits immediately:

docker-cloud service run -n downloader -p 2222:2222 ubuntu

I know if I were running this outside of docker-cloud I could set the container to run in interactive mode at least, but I don’t see any way to keep the container up. It always exits with code 0 and the event log shows a die event.

Here are the logs:

Service Start

Preparing to deploy... Inspecting ubuntu:latest image in the registry Image up to date in our database Deploying... Choosing best nodes... Candidate node XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.node.dockerapp.io. State: Deployed. Total num containers: 2. Num containers from this service: 0 Choosing node XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.node.dockerapp.io because of a 'volume from' restriction downloader-1: Deploying in XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.node.dockerapp.io downloader-1: Pulling image ubuntu:latest in XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.node.dockerapp.io downloader-1: Creating in XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.node.dockerapp.io with docker name downloader-1.8098174b downloader-1: Starting with docker id XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX in XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.node.dockerapp.io downloader-1: Running in XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.node.dockerapp.io Service Start action on 'downloader' (using 'ubuntu:latest') has finished successfully

Service Terminate

Terminating... downloader-1: Stopping gracefully (Timeout 10s)... downloader-1: Terminating... downloader-1: Terminated Service Terminate action on 'downloader' (using 'ubuntu:latest') has finished successfully

Any help is much appreciated!


(Yvan BARTHÉLEMY) #2

I got the same issue. However I don’t know how to check the logs. I worked around by using tutum/ubuntu instead of official ubuntu image which allowed me to add volumes and ssh at will.


(Robertteamnow) #3

Interesting. Thanks for the reply Yvan.

My workaround is to ditch Docker Cloud for AWS Elastic Container Service. :wink: