我有一个 dockerfile,我的图像是 python:3.7-alpine。
在我的项目中,我使用了一个需要下载的 git 存储库。 有什么办法吗?
我的 Dockerfile:
FROM python:3.7-alpine
ENV DOCKER_APP True
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . app/
WORKDIR app/
ENTRYPOINT ["python3", "main.py"]
我的要求:
certifi==2020.6.20
requests==2.24.0
urllib3==1.25.10
git+https://github.com/XXX/YYY
感谢
最佳答案
将以下内容添加到您的 dockerfile
RUN apk update
RUN apk add git
关于python - docker python 图像中的 Git 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65061121/