The installation instructions of the Gitea documentation using docker describe the SSH passthrough procedure to make the git clone [email protected]:user/repo command not failing.
I am new to docker but I am wondering, these few last 'manual' steps, can't they be automatised in a docker-compose.yml (and if so how would this file look like). It's not like a lot of steps but my understanding was that a docker container is supposed to be self-sufficient and with those steps it seems like it's not really.
The SSH key creation should be done on the host, which is not what a
docker-compose.ymlis made for.Everything happening on
/home/git/.sshcould be scripted, separately from docker-compose.The injection of the private key is done through a volume, as suggested here