I pasted a question earlier about cloning multiple private repos. I ended up getting that question answered from How to access two different private repositories created by me.
Now, my next issue is i am having trouble doing this in a docker container.
My docker file:
# syntax = docker/dockerfile:1.0-experimental
FROM python:3.9
# create a folder and cd into it
run mkdir temp_repo
run cd temp_repo
# set folder as current working directory
workdir /temp_repo
# move hello_world.py script from our local system to current workdir in docker
add hello_world.py .
# copy the requirements file from current system to docker directory
copy requirements.txt .
run pip install -r requirements.txt
copy . /temp_repo
RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
RUN --mount=type=ssh pip install git+ssh://git@github.com/moon_research/dbreader.git
RUN --mount=type=ssh git clone git+ssh://git@github.com/moon_research/dbreader.git
RUN --mount=type=ssh pip install git+ssh://git@github.com/moon_research/trading-engine.git
copy timescale.pem /root
run apt-get update -y
cmd ["python", "-u", "hello_world.py"]
my config file:
Host dbreader
Hostname github.com
User git
IdentityFile=/Users/raj/.ssh/id_rsa
Host trading-engine
Hostname github.com
User git
IdentityFile=/Users/raj/.ssh/id_rsa_docker
how am i telling docker to use the config file to access github? Thanks