Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to start Docker containers for first time #559

Closed
jez opened this issue Aug 21, 2015 · 1 comment
Closed

Error when trying to start Docker containers for first time #559

jez opened this issue Aug 21, 2015 · 1 comment
Assignees

Comments

@jez
Copy link
Contributor

jez commented Aug 21, 2015

There is a known issue with Docker Compose that makes it difficult to launch the containers in the correct order when migrations need to be run. Specifically, the error looks like:

$ docker-compose run --rm -e RAILS_ENV=production web rake db:migrate
Starting autolabprod_db_1...
Cannot start container 2ef8d589bdcce38d8d961a762cf934e0c0326c94d6b59827c05cf15f3e6b852f: Cannot link to a non running container: /autolabprod_db_1 AS /autolabprod_web_run_1/autolabprod_db_1

It is being tracked upstream at moby/moby#7445 and docker/compose#374.

The current workaround is to:

# start the db container
$ docker-compose up db

# --- wait for the output from initialization to appear to stop ---
# --- quit the container with ^C ---

# now finally launch everything
$ docker-compose up -d
@nayak16 nayak16 self-assigned this Feb 12, 2016
@nayak16
Copy link
Member

nayak16 commented Oct 5, 2016

Fixed with onelick

@nayak16 nayak16 closed this as completed Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants