I want to build via the docker-compose an image that uses my private key for cloning private git repos.
docker-compose
git
More or less the compose becomes as fol
You can use the same syntax with docker-compose build:
docker-compose build --build-arg RSA="$(cat ~/.ssh/id_rsa)"
Unfortunately, you can't use the build-args option with compose up or start... So you will need to build and then run using the --no-build option
--no-build