1

here is my Dockerfile tried to build:

FROM ubuntu:latest

# install flask server
RUN apt-get update -y
RUN apt-get install -y python-pip python-dev build-essential
COPY app.py /
RUN pip install flask

# install ruby
RUN \
  apt-get install -y ruby ruby-dev ruby-bundler && \
  rm -rf /var/lib/apt/lists/*

# install lua
RUN apt-get update -y && apt-get install -y luajit luarocks

# Define default command.
CMD [“python”, “app.py”]

However, it shown up with error /bin/sh: 1: [“python”,: not found

I have no idea why this happened. Could someone please help me with it?

Wang Nick
  • 385
  • 1
  • 6
  • 17

1 Answers1

6

Make sure to use the right CMD syntax with "", not “”:

CMD ["executable","param1","param2"] (exec form, this is the preferred form)
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • So many evil double quotes out there -- http://unicode.org/cldr/utility/confusables.jsp?a=%22&r=None (from http://stackoverflow.com/a/18739948/4148708) – evilSnobu Oct 02 '16 at 06:40
  • @evilSnobu it reminds me of the evil hyphen vs. minus: http://stackoverflow.com/a/170148/6309 – VonC Oct 02 '16 at 06:41