docker で gerrit を実行しています。dockerhub から画像を取得しました。私はこのように実行しています:
docker run -it -p 8080:8080 -p 29418:29418 --rm
-e AUTH_TYPE='DEVELOPMENT_BECOME_ANY_ACCOUNT'
-v /home/gerrit-site:/home/gerrit/site
-v /root/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub
-v /root/.ssh/id_rsa:/root/.ssh/id_rsa
-v /home/accounts/ssh-keys/:/home/gerrit/ssh-keys
--name gerrit docker.io/fabric8/gerrit:latest
イメージは実行されており、ip:8080 などの URL からアクセスできます。しかし、ssh 経由でクローンを作成しようとすると、次のエラーが発生します。
Cloning into 'project'...
ssh: connect to host host_ip port 29418: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
後で、ホストの ssh キーを gerrit に追加して、クローン作成を試みましたが、成功しませんでした。
ssh ip:29418 を試すと、
ssh: Could not resolve hostname ip:29418: Name or service not known
どこが間違っているのかわからないので、ガイダンスが必要です。