Docker-compose run is very slow loading rails environment

Dear all,

I am running the following command:

docker-compose --verbose run web bundle exec rspec spec/controllers/<my-controller.spec>

Looking at the output I see that docker-compose gets stuck on this point:

06f42b4aad9f972b778b7f57259d5c5896662e’)
compose.cli.verbose_proxy.proxy_callable: docker inspect_container -> {u’AppArmorProfile’: u’’,
u’Args’: [u’exec’, u’rspec’, u’spec/controllers/session_controller_spec.rb’],
u’Config’: {u’AttachStderr’: True,
u’AttachStdin’: True,
u’AttachStdout’: True,
u’Cmd’: [u’bundle’, u’exec’, u’rspec’, u’spec/controllers/session_controller_spec.rb’],
u’Domainname’: u’’,
.
compose.cli.verbose_proxy.proxy_callable: docker resize <- (u’c8f765e1554fef5bd39bbff35306f42b4aad9f972b778b7f57259d5c5896662e’, width=99, height=26)

compose.cli.verbose_proxy.proxy_callable: docker resize -> None

It takes almost 5 minutes to continue and run the test.

Any idea?

Environment: MAC OSX El Capitan 10.11.3
docker-compose version 1.7.1, build 0a9ab35
Docker version 1.11.2, build b9f10c9

Thanks.

Are you using volumes? It might be related with File access in mounted volumes extremely slow, CPU bound