8

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
  • I used slim-buster image instead of alpine. And I run "RUN apt-get update; apt-get install-y git" Hope it will help you Commented Nov 29, 2020 at 14:48

1 Answer 1

13

add the following to your dockerfile

RUN apk update
RUN apk add git
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.