我正在基于标准的Ubuntu14.04映像构建一个新的Docker映像.
这是我的Dockerfile:
FROM ubuntu:14.04
RUN apt-get update -y
RUN apt-get install -y nginx git python-setuptools python-dev
RUN easy_install pip
ADD . /code
WORKDIR /code
RUN pip install -r requirements.txt # only 'django' for now
ENV projectname myproject
EXPOSE 80 8000
WORKDIR ${projectname}
CMD ['python', 'manage.py', 'runserver', '0.0.0.0:80']
当我try 运行此映像时,收到此错误.
/bin/sh:1:[python,:未找到
但如果我在运行图像时打开一个shell,那么运行python
会按预期打开交互式提示.
为什么我不能在Dockerfile中调用python
到CMD
?