title: docker-compose up fails: "no such file or directory" but the file exists
body: <p>I am trying to dockerize an existing ruby on rails application. I have been able to get through the build process, and build without any errors. However, when I try and <code>docker-compose up</code> I am getting an error that an .so file does not exist. When I run <code>docker-compose run web ls -l /usr/src/app/lib</code> the file is clearly there.</p>
  
  <p>I am working on a Windows 10 machine, but I am using Linux docker containers. I have already done a dos2unix for my Dockerfile, docker-compose.yml, and my entrypoint.sh. I have not tried to do it for all of the files in this system though. I pulled the repo from git, and my configuration is set to <code>git config --global core.autocrlf false</code></p>
  
  <p>How am I supposed to get past the "file does not exist" error when the file actually does exist? </p>
  
  <p>Here's what I have:</p>
  
  <p>docker-compose.yml</p>
  
  <pre><code>version: '3.7'
  services:
    web:
      build: .
      volumes:
        - .:/usr/src/app
      ports:
        - "3000:3000"
  </code></pre>
  
  <p>Dockerfile</p>
  
  <pre><code>FROM ruby:2.5
  
  # -y is automatic yes to prompts, and qq is quiet quiet. No output except for errors.
  RUN apt-get update -yqq \
      &amp;&amp; apt-get install -yqq \
          build-essential \
          libc6-dev \
          libpq-dev \
          libnss3-dev \
          libgconf-2-4 \
          qt5-default \
          libqt5webkit5-dev \
          freetds-dev \
          nodejs \
          libmapscript-ruby \
      &amp;&amp; apt-get -q clean \
      &amp;&amp; rm -rf /var/lib/apt/lists
  
  # set the working directory
  RUN mkdir -p /usr/src/app
  WORKDIR /usr/src/app
  
  # Set the environment for now...
  ENV RAILS_ENV development
  
  # Copy Gemfiles
  COPY Gemfile /usr/src/app/Gemfile
  
  RUN gem install bundler
  RUN bundle install
  RUN bundle install
  
  # Add a script to be executed every time the container starts.
  COPY entrypoint.sh /usr/src/app/entrypoint.sh
  RUN chmod +x /usr/src/app/entrypoint.sh
  
  COPY . /usr/src/app
  
  # Start the main process.
  CMD ["/usr/src/app/entrypoint.sh"]
  </code></pre>
  
  <p>entrypoint.sh</p>
  
  <pre><code>#!/bin/bash
  
  rails server
  </code></pre>
  
  <p>Here is the output of my error, and then me doing an ls -l right afterwards.</p>
  
  <pre><code>PS C:\Users\&lt;USERNAME&gt;\source\repos\ruby\my_rails_app&gt; docker-compose up
  Recreating my_rails_app_web_1 ... done
  Attaching to my_rails_app_web_1
  web_1  | /usr/local/bundle/gems/ruby_mapscript-0.3.0/lib/mapscript/mapscript_extensions.rb:3:in 'require': libruby-2.0.so.2.0: cannot open shared object file: No such file or directory - /usr/src/app/lib/mapscript.so (LoadError)
  web_1  |        from /usr/local/bundle/gems/ruby_mapscript-0.3.0/lib/mapscript/mapscript_extensions.rb:3:in '&lt;top (required)&gt;'
  web_1  |        from /usr/local/bundle/gems/ruby_mapscript-0.3.0/lib/ruby_mapscript.rb:2:in 'require'
  web_1  |        from /usr/local/bundle/gems/ruby_mapscript-0.3.0/lib/ruby_mapscript.rb:2:in '&lt;top (required)&gt;'
  web_1  |        from /usr/local/bundle/gems/bundler-2.1.4/lib/bundler/runtime.rb:74:in 'require'
  web_1  |        from /usr/local/bundle/gems/bundler-2.1.4/lib/bundler/runtime.rb:74:in 'block (2 levels) in require'
  web_1  |        from /usr/local/bundle/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in 'each'
  web_1  |        from /usr/local/bundle/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in 'block in require'
  web_1  |        from /usr/local/bundle/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in 'each'
  web_1  |        from /usr/local/bundle/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in 'require'
  web_1  |        from /usr/local/bundle/gems/bundler-2.1.4/lib/bundler.rb:174:in 'require'
  web_1  |        from /usr/src/app/config/application.rb:13:in '&lt;top (required)&gt;'
  web_1  |        from /usr/local/bundle/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:88:in 'require'
  web_1  |        from /usr/local/bundle/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:88:in 'block in server'
  web_1  |        from /usr/local/bundle/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:85:in 'tap'
  web_1  |        from /usr/local/bundle/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:85:in 'server'
  web_1  |        from /usr/local/bundle/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:49:in 'run_command!'
  web_1  |        from /usr/local/bundle/gems/railties-5.0.7.2/lib/rails/commands.rb:18:in '&lt;top (required)&gt;'
  web_1  |        from script/rails:6:in 'require'
  web_1  |        from script/rails:6:in '&lt;main&gt;'
  my_rails_app_web_1 exited with code 1
  PS C:\Users\&lt;USERNAME&gt;\source\repos\ruby\my_rails_app&gt; docker-compose run web ls -l /usr/src/app/lib
  total 524
  drwxrwxrwx 2 root root      0 Jan 15 14:25 assets
  -rwxr-xr-x 1 root root 533672 Jan 14 16:46 mapscript.so
  drwxrwxrwx 2 root root      0 Jan 15 14:25 tasks
  PS C:\Users\&lt;USERNAME&gt;\source\repos\ruby\my_rails_app&gt; docker-compose run web ls -l /usr/src/app
  total 183
  -rwxr-xr-x 1 root root   788 Jan 15 14:24 Capfile
  -rwxr-xr-x 1 root root   927 Jan 16 17:12 Dockerfile
  -rwxr-xr-x 1 root root  2467 Jan 16 16:15 Gemfile
  -rwxr-xr-x 1 root root 10224 Jan 15 17:01 Gemfile.lock
  -rwxr-xr-x 1 root root  8228 Jan 15 14:24 Gemfile.lock.old
  -rwxr-xr-x 1 root root  1983 Jan 15 14:24 Gemfile.old
  -rwxr-xr-x 1 root root  6131 Jan 15 14:24 README.rdoc
  -rwxr-xr-x 1 root root   271 Jan 15 14:24 Rakefile
  drwxrwxrwx 2 root root     0 Jan 14 16:46 app
  -rwxr-xr-x 1 root root  3721 Jan 16 15:48 bill_pdf.rb
  drwxrwxrwx 2 root root     0 Jan 16 15:48 bootstrap
  drwxrwxrwx 2 root root     0 Jan 16 15:49 config
  -rwxr-xr-x 1 root root   156 Jan 15 14:24 config.ru
  drwxrwxrwx 2 root root     0 Jan 15 14:25 db
  drwxrwxrwx 2 root root     0 Jan 15 14:25 doc
  -rwxr-xr-x 1 root root   112 Jan 16 17:11 docker-compose.yml
  -rwxr-xr-x 1 root root    26 Jan 16 15:37 entrypoint.sh
  -rwxr-xr-x 1 root root   524 Jan 15 14:24 fix_image.rb
  drwxrwxrwx 2 root root     0 Jan 14 16:46 fusenh
  drwxrwxrwx 2 root root     0 Jan 15 14:25 lib
  -rwxr-xr-x 1 root root 27619 Jan 14 16:46 lightower.png
  -rwxr-xr-x 1 root root  7430 Jan 14 16:46 lightower_cc_logo_A.png
  drwxrwxrwx 2 root root     0 Jan 15 14:25 log
  -rwxr-xr-x 1 root root     0 Jan 15 14:24 lt.css
  drwxrwxrwx 2 root root     0 Jan 14 16:46 node_modules
  drwxrwxrwx 2 root root     0 Jan 15 14:25 public
  -rwxr-xr-x 1 root root 42550 Jan 14 16:46 sample_partial_invoice.pdf
  -rwxr-xr-x 1 root root 42550 Jan 14 16:46 sample_usf_document.pdf
  drwxrwxrwx 2 root root     0 Jan 15 14:40 script
  drwxrwxrwx 2 root root     0 Jan 15 14:40 spec
  -rwxr-xr-x 1 root root   814 Jan 15 14:24 test.pdf
  drwxrwxrwx 2 root root     0 Jan 16 15:48 tmp
  drwxrwxrwx 2 root root     0 Jan 14 16:47 vendor
  </code></pre>