Docker разрешение файла в Windows 10 pro - PullRequest
0 голосов
/ 21 марта 2020

Я пытаюсь запустить свой проект rails на Docker Windows 10 pro. Я обычно программирую этот проект на ма c, но мои коллеги используют windows, поэтому я пытаюсь настроить его на docker.

, но я встретил ??? проблема разрешения, поэтому я не могу запустить пакетную установку. Любые идеи?

C:\Users\tmaekawa\proj>docker-compose run web ls -la
ls: cannot access '.env.development': No such file or directory
ls: cannot access 'Gemfile': No such file or directory
ls: cannot access 'Rakefile': No such file or directory
ls: cannot access 'config.ru': No such file or directory
total 4
drwxrwxrwx 1 root root 8192 Mar 21 10:41 .
drwxr-xr-x 1 root root 4096 Mar 21 10:42 ..
drwxrwxrwx 1 root root    0 Mar 21 08:13 .bundle
-????????? ? ?    ?       ?            ? .env.development
drwxrwxrwx 1 root root 4096 Mar 21 10:25 .git
-rwxr-xr-x 1 root root  536 Mar 21 00:18 .gitignore
-rwxr-xr-x 1 root root  438 Mar 21 00:18 .project
-rwxr-xr-x 1 root root   30 Mar 21 00:18 .rspec
-rwxr-xr-x 1 root root    6 Mar 21 08:22 .ruby-version
-rwxr-xr-x 1 root root  492 Mar 21 10:22 Dockerfile
-????????? ? ?    ?       ?            ? Gemfile
-rwxr-xr-x 1 root root 1614 Mar 21 00:18 Guardfile

При запуске комплекта установки я получил следующую ошибку из-за проблемы с разрешением Gemfile.

C:\Users\tmaekawa\proj>docker-compose run web bundle install --without production
/usr/local/lib/ruby/site_ruby/2.4.0/bundler.rb:431:in `initialize':  (Bundler::Dsl::DSLError)
[!] There was an error parsing `Gemfile`: No such file or directory @ rb_sysopen - /myapp/Gemfile. Bundler cannot continue.
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler.rb:431:in `open'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler.rb:431:in `block in read_file'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/shared_helpers.rb:118:in `filesystem_access'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler.rb:430:in `read_file'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/dsl.rb:46:in `eval_gemfile'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/plugin.rb:60:in `gemfile_install'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli/install.rb:60:in `run'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:235:in `block in install'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/settings.rb:143:in `temporary'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:234:in `install'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:27:in `dispatch'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:18:in `start'
        from /usr/local/bin/bundle:30:in `block in <main>'
        from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'
        from /usr/local/bin/bundle:22:in `<main>'

Выполните ту же команду еще раз, я получил еще одну ошибку.

C:\Users\tmaekawa\proj>docker-compose run web bundle install --without production
Could not locate Gemfile

ДОПОЛНИТЕЛЬНАЯ ИНФОРМАЦИЯ RUN docker информация из cmd.exe

C:\Users\tmaekawa\proj>docker info
Client:
 Debug Mode: false

Server:
 Containers: 87
  Running: 0
  Paused: 0
  Stopped: 87
 Images: 229
 Server Version: 19.03.8
 Storage Driver: overlay2
  Backing Filesystem: <unknown>
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.76-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 1.943GiB
 Name: docker-desktop
 ID: O2AV:RXYB:YEHH:2HBL:JBSZ:DEO6:OK2N:7GFU:WQMX:BENM:JHTK:JFSS
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 35
  Goroutines: 52
  System Time: 2020-03-21T12:30:31.003329328Z
  EventsListeners: 3
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

run docker -compose --version

C:\Users\tmaekawa\proj>docker-compose --version
docker-compose version 1.25.4, build 8d51620a
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...