Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git repository within docker python image

Tags:

git

python

docker

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

like image 279
PicxyB Avatar asked Jun 16 '26 01:06

PicxyB


1 Answers

add the following to your dockerfile

RUN apk update
RUN apk add git
like image 112
ozs Avatar answered Jun 18 '26 14:06

ozs