Docker issue: /bin/sh: pip: not found

后端 未结 2 446
情歌与酒
情歌与酒 2021-01-17 13:26

So my dockerfile is :

FROM iron/python:2.7

WORKDIR /app
ADD . /app

RUN pip install --upgrade pip
RUN pip install -r ./requirements.txt

Re

2条回答
  •  不知归路
    2021-01-17 13:47

    For Python3:

    FROM ubuntu:latest
    WORKDIR /app
    ADD . /app
    RUN set -xe \
        && apt-get update \
        && apt-get install python3-pip
    RUN pip3 install --upgrade pip
    RUN pip3 install -r requirements.txt
    

    Thats it :-)

提交回复
热议问题