I have a docker image with this command:
FROM ruby:2.4-alpine WORKDIR /usr/src/app COPY Gemfile /usr/src/app/Gemfile COPY Gemfile.lock /usr/src/app/Gemfile.
I had this problem with Docker for Windows and the solution was changing the entrypoint script file from CRLF -> LF.