在Mac上使用boot2docker运行jekyll docker容器时出错

时间:2015-06-05 12:33:57

标签: docker jekyll

我正在使用boot2docker(v1.6.2)在我的MBP(Yosemite 10.10.3)上运行docker。当我尝试运行docker run --rm -v "$PWD:/src" grahamc/jekyll build(没有sudo)时,我收到以下错误:

twer$ $(boot2docker shellinit 2> /dev/null)
twer$ docker run --rm -v "$PWD:/src" grahamc/jekyll build
/usr/local/bundle/gems/bundler-1.9.9/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find coffee-script-source-1.9.1 in any of the sources (Bundler::GemNotFound)
from /usr/local/bundle/gems/bundler-1.9.9/lib/bundler/spec_set.rb:85:in `map!'
from /usr/local/bundle/gems/bundler-1.9.9/lib/bundler/spec_set.rb:85:in `materialize'
from /usr/local/bundle/gems/bundler-1.9.9/lib/bundler/definition.rb:132:in `specs'
from /usr/local/bundle/gems/bundler-1.9.9/lib/bundler/definition.rb:177:in `specs_for'
from /usr/local/bundle/gems/bundler-1.9.9/lib/bundler/definition.rb:166:in `requested_specs'
from /usr/local/bundle/gems/bundler-1.9.9/lib/bundler/environment.rb:18:in `requested_specs'
from /usr/local/bundle/gems/bundler-1.9.9/lib/bundler/runtime.rb:13:in `setup'
from /usr/local/bundle/gems/bundler-1.9.9/lib/bundler.rb:122:in `setup'
from /usr/local/bundle/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:37:in `require_from_bundler'
from /usr/local/bundle/gems/jekyll-2.5.3/bin/jekyll:16:in `<top (required)>'
from /usr/local/bundle/bin/jekyll:23:in `load'

请帮忙。

1 个答案:

答案 0 :(得分:0)

它在我的机器上正常工作:

$ docker run --rm -v "$PWD:/src" -p 4000:4000 grahamc/jekyll serve -H 0.0.0.0
Configuration file: /src/_config.yml
            Source: /src
       Destination: /src/_site
      Generating...
     Build Warning: Layout 'nil' requested in atom.xml does not exist.
     Build Warning: Layout 'none' requested in feed.xml does not exist.
                    done.
 Auto-regeneration: enabled for '/src'
Configuration file: /src/_config.yml
    Server address: http://0.0.0.0:4000/
  Server running... press ctrl-c to stop.

我最好的猜测是您的源代码中有Gemfile