gpt4 book ai didi

docker - Dockerfile错误:/bin/sh:1:[“python”,:找不到

转载 作者:行者123 更新时间:2023-12-02 18:46:50 24 4
gpt4 key购买 nike

这是我尝试构建的Dockerfile:

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”]

但是,它显示有错误
/ bin / sh:1:[“python” ,:未找到

我不知道为什么会这样。有人可以帮我吗?

最佳答案

确保使用正确的 CMD syntax""而不是“”:

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

关于docker - Dockerfile错误:/bin/sh:1:[“python”,:找不到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39814465/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com