0

I am trying to git clone repo to my machine(locally) while running dockerfile.

But, it is cloning in to container.

I need to be cloned to my local machine, ple correct me if my Dockerfile is wrong.

Here is my Docker file

FROM python:3 RUN apt-get update && apt-get install -y \ git WORKDIR /usr/src/app RUN git clone https://github.com/testgithub-trial/docktest.git COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt COPY . . CMD [ "python", "main.py" ] 

1 Answer 1

4

how git clone locally (to my machine) using Dockerfile?

It is not possible to do anything to your machine from Dockerfile.

I need to be cloned to my local machine

So do not use a Dockerfile. You can do from a docker container by bind-mounting a directory, but not from docker build.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.