我尝试使用官方Rails image for Docker创建我的开发环境,在使用docker build -t my-rails-app .
创建容器后,我尝试使用此命令引导新应用:
docker run -it --rm --user "$(id -u):$(id -g)" -v "$PWD":/usr/src/app -w /usr/src/app rails rails new --skip-bundle webapp
得到了这个错误:
create
/usr/locfrom /usr/local/lib/ruby/2.3.0/fileutils.rb:253:in `fu_mkdir'ied @ dir_s_mkdir - /usr/src/app/webapp (Errno::EAC
CES) from /usr/local/lib/ruby/2.3.0/fileutils.rb:227:in `block (2 levels) in mkdir_p'
from /usr/local/lib/ruby/2.3.0/fileutils.rb:225:in `block in mkdir_p'
from /usr/local/lib/ruby/2.3.0/fileutils.rb:211:in `mkdir_p'
from /usr/local/bundle/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
from /usr/local/bundle/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'b:49:in `invoke!'
from /usr/local/bundle/gems/railties-4.2.6/lib/rails/generators/app_base.rb:138:in `create_root'ry'
from /usr/local/bundle/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /usr/local/bundle/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /usr/local/bundle/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map''
from /usr/local/bundle/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'ke_all'
from /usr/local/bundle/gems/railties-4.2.6/lib/rails/commands/application.rb:17:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/bundle/gems/railties-4.2.6/bin/rails:9:in `<top (required)>':55:in `require'
from /usr/local/bundle/bin/rails:22:in `<main>'
我该如何解决这个问题?