Can't install pip packages inside a docker container with Ubuntu

前端 未结 16 2375
抹茶落季
抹茶落季 2020-11-30 19:07

I\'m following the fig guide to using docker with a python application, but when docker gets up to the command

RUN pip install -r requirements.txt

16条回答
  •  猫巷女王i
    2020-11-30 19:23

    In case someone is reading this using docker-compose. I managed to resolve this by changing my yaml file as follows

    version: 3.4
    service: my-app
      build:
      context: .
      network: host
    

    which is equivalent to writing

    docker build . --network host
    

提交回复
热议问题