Wang Nick
Wang Nick

Reputation: 495

Dockerfile error: /bin/sh: 1: [“python”,: not found

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?

Upvotes: 1

Views: 10317

Answers (1)

VonC
VonC

Reputation: 1323025

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

CMD ["executable","param1","param2"] (exec form, this is the preferred form)

Upvotes: 6

Related Questions