# Run command docker-compose not working

**URL:** <https://forums.docker.com/t/run-command-docker-compose-not-working/13881>\
**Category:** Docker Desktop\
**Tags:** docker, beta\
**Created:** [May 27, 2016, 3:59pm UTC](https://forums.docker.com/t/run-command-docker-compose-not-working/13881 "2016-05-27T15:59:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alebatt](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/alebatt/32/10451_2.png) [@alebatt](https://forums.docker.com/u/alebatt)\
**Post date:** [May 27, 2016, 3:59pm UTC](https://forums.docker.com/t/run-command-docker-compose-not-working/13881/1 "2016-05-27T15:59:49Z")

</div>

Let’s start with my system configuration :

- Docker  
I was under the beta13 version (today’s one 27/05/16) sorry i can’t tell you the exact version now i delete it.

- Mac OSX El capitan 2,7 i5, 8Go

Now the problem.

I made 3 containers : with docker-compose

- api → Rails api
- web → Angular webpack
- db → Mongodb

The code is nothing crazy, just a scaffolding and a csv seeds.  
When i want to seed my database, i have a connection error. i tried many thing, but nothing work until i changed to the docker-machine and uninstall docker native.

I got an error when running `docker-compose run api rake db:seed`

`Mongo::Error::NoServerAvailable: No server is available matching preference: #<Mongo::ServerSelector::Primary:0x47121755943460 tag_sets=[] server_selection_timeout=30 local_threshold=0.015>`

And the same command with docker-machine environment working.  
(of course i just change the docker ip addresse from localhost to Dockermachine ip)

Hope this will help someone, or could be fix.
