Errno::EACCES creating rails project using Docker Rails image

I’m trying to use the official Rails image for Docker to create my development environment and after creating the container using docker build -t my-rails-app . I tried to bootstrap the new app using this command:

docker run -it --rm --user "$(id -u):$(id -g)" -v "$PWD":/usr/src/app -w /usr/src/app rails rails new --skip-bundle webapp

And got this error:

  • Accessing Secrets/Private Files Needed for Building in Dockerfile?
  • Is Docker ARG allowed within CMD instrcution
  • Docker client cannot connect to daemon version 1.9: connection reset by peer
  • Docker - secure mysql configuration
  • Unexpected error when Vagrant up using yaml file
  • Solr on Docker:localhost:8983 not working
  •       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>'

    How can I solve this?

  • docker/boot2docker in amazon ec2
  • how does docker treat child process when we send stop to pid 1
  • Free Docker volume drivers? [closed]
  • Development workflow for docker-compose: run a dev-version container
  • Why Can't I Access Service in Docker Swarm by its Name or VIP?
  • Publishing Docker to AWS from Visual Studio
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.