keep Guard running inside a docker container

时间:2016-04-25 09:13:27

标签: ruby docker guard

everyone. Is there a way to keep Guard running inside a docker container?

At this point, I have tried many different things but all seems to fail.

Originally I was running it bundle exec guard .... but since now I need to manage the Docker container with Docker Cloud I cannot specify anymore -i as option to the run command so with that approach Guard closes right after booting.

11:03:18 - INFO - Guard is now watching at '/usr/app'
11:03:19 - INFO - Bye bye...

I tried to run Guard programmatically from a ruby file as such

...
guardfile = <<-EOF
  ...
EOF
Guard.start(guardfile_contents: guardfile)

with the same outcome.

I have also tried to use directly the listen gem but in this case the changes to files are not picked up.

Now, I'm out of options. Any suggestions?

Thanks

1 个答案:

答案 0 :(得分:2)

如果您不能再指定-i选项,您仍可以通过禁用Guardfile内的互动来获得相同的效果:

https://github.com/guard/guard/wiki/Guardfile-DSL---Configuring-Guard#interactor

with:interactor :off

相关问题