The error message Host key verification failed. is not complaining about your private key, but rather the host key for You can do this to add the github hostkey:

ssh-keyscan -t rsa > ~/.ssh/known_hosts

Perhaps you have your reasons, but in general cloning the git repo in to the image is not the preferred way to run your code in a container. Instead, put a Dockerfile at the root of your repo, and within the Dockerfile use the ADD command to include your source code in the container.

As you have it written now, your private key is part of the Docker image. Anyone you share the image with will also have your private key.

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *

Любишь мемасики?

Подпишись на мой телеграм-канал!