title: docker run <image> : /usr/bin/env: ruby.exe : No such file or directory
body: <p>I am trying to run my image, but I get the error described in the title, it seems to not be able to locate a file / directory. I have googled around and found various fixes, but nothing worked for me.</p>
  
  <p>In the container logs I found /usr/bin/env: ruby.exe : No such file or directory, so it seems to have some issue there.</p>
  
  <p>My Dockerfile:</p>
  
  <pre><code>FROM ruby:2.3.3
  
  # Set the working directory to /app
  RUN apt-get update -qq &amp;&amp; apt-get install -y build-essential nodejs
  
  ENV APP_HOME /fitnesspage
  
  RUN mkdir $APP_HOME
  
  ADD . $APP_HOME
  
  WORKDIR $APP_HOME
  
  ADD Gemfile* $APP_HOME/
  
  RUN bundle install
  
  RUN chmod 0777 -R $APP_HOME
  
  RUN useradd -m myuser
  USER myuser
  
  CMD bin/rails server
  </code></pre>
  
  <p>My bin/rails:</p>
  
  <pre><code>#!/usr/bin/env ruby.exe
  APP_PATH = File.expand_path('../config/application', __dir__)
  require_relative '../config/boot'
  require 'rails/commands'
  </code></pre>
  
  <p>I think from what I am reading that it struggles with the CMD in the Dockerfile, but I don't know how to proceed to fix it. I have tried to change #!/usr/bin/env ruby.exe to #!/usr/bin/env ruby in bin/bundle, bin/rails and bin/rake. Made no difference except for the error.</p>
  
  <p>EDIT:
  The error changed to /usr/bin/env: ruby : No such file or directory instead.</p>