Dockerfile和Rails错误

我正在按照教程来testingDocker与Rails应用程序。 url是: https : //blog.codeship.com/running-rails-development-environment-docker/

我在我的Mac上安装了本机Docker,我正在执行第2步。下面列出了Dockerfile。 一切编译罚款:

docker build -t demo . docker run -it demo "bundle exec rake test" 

但是,当我运行docker run -itP demo来启动应用程序时,我得到一个错误:

 /bin/sh:1: ["bundle",: not found 

我无法find任何地方这个错误的参考。 我需要做些什么来解决这个问题?

 FROM ruby:2.2 MAINTAINER marko@codeship.com # Install apt based dependencies required to run Rails as # well as RubyGems. As the Ruby image itself is based on a # Debian image, we use apt-get to install those. RUN apt-get update && apt-get install -y \ build-essential \ nodejs # Configure the main working directory. This is the base # directory used in any further RUN, COPY, and ENTRYPOINT # commands. RUN mkdir -p /app WORKDIR /app # Copy the Gemfile as well as the Gemfile.lock and install # the RubyGems. This is a separate step so the dependencies # will be cached unless changes to one of those two files # are made. COPY Gemfile Gemfile.lock ./ RUN gem install bundler && bundle install --jobs 20 --retry 5 # Copy the main application. COPY . ./ # Expose port 3000 to the Docker host, so we can access it # from the outside. EXPOSE 3000 # The main command to run when the container starts. Also # tell the Rails dev server to bind to all interfaces by # default. CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]