Git repository within docker python image

Viewed 3997

I have a dockerfile, where my image is python:3.7-alpine.

In my project, I use a git repository I need to download. Is there any way to do that ?

My 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"]

my requirements :

certifi==2020.6.20
requests==2.24.0
urllib3==1.25.10
git+https://github.com/XXX/YYY

Thank

1 Answers

add the following to your dockerfile

RUN apk update
RUN apk add git
Related