我有以下docker文件:
FROM ubuntu:latest
RUN apt-get update \
&& apt-get install -y python3-pip python3-dev \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python3 \
&& pip3 install --upgrade pip
USER root
COPY scripts scripts
RUN ls
RUN pwd
RUN chmod +x ./scripts/functional_test_cli/baft.py
COPY tests tests
RUN pip3 install Pytest
RUN pip3 install pytest-json-report
RUN pip3 install Tavern
RUN pip3 install allure-pytest
RUN pip3 install pytest-pythonpath
RUN pip install --upgrade setuptools
RUN which python
RUN python3 version
CMD ["python3", "./scripts/functional_test_cli/baft.py"]
因此,当运行python3版本时,会抛出以下错误:
python: can't open file 'version': [Errno 2] No such file or directory
我有什么遗漏吗?为什么python3不被识别为命令?