@MarioFlach impressive !
I’ve got a question. When building Erlang/Elixir software in docker - private repositories (git ssh) are always a problem. The current options are:
- (Linux only, doesn’t work on Mac) - Dockerfile which mounts ssh-agent
- Copy id_rsa into docker container
- Fetch dependencies, then run the docker build - possible but ugly - and doesn’t work well with build caching (invalidates the cache).
I’ve had an idea of a possible solution. A ssh git proxy running in the same docker network, with the hostname github.com
- You provide a machine user SSH key as credentials when starting the git proxy - the SSH key can read all required repositories, but not write.
- Your build containers is also configured to use this network (lets call it ‘ci’)
- Your build runs, it makes git ssh requests to download dependencies, but thanks to the magic of docker hostnames it’s actually talking to the proxy.
- The proxy deleagates to github, pulls the repo, maybe caches it, and returns it to the build containers.
- $profit$ - well actually no profit, it’s open-source
I was wondering could some part of your project be reused to achieve this goal - it would really improve the CI story for Erlang/Elixir vs go (where all the dependencies are just ‘vendored’ (copy-n-pasted) into the repository.
+-------------------------Network 'ci'-----------------------------+
| |
| |
| +----------------+ Fetch dependency +------------------+ |
| | | (git ssh) | Docker container | |
| | docker build +----------------------> (github.com) | |
| | | | | |
| +----------------+ +------------------+ |
| | |
| | |
+------------------------------------------------------------------+
|
|
+--------------------------+ |
| | |
| Github.com +<---+
| | Fetch and cache
| |
| |
+--------------------------+
I’m thinking of tools like :
- GitHub - kurzdigital/git-cache-http-server-docker: git-cache-http-server as a Docker container · GitHub
- https://github.com/bryanhuntesl/apt-cacher-ng
Thanks,
Bryan






















