Closed markusweigelt closed 1 year ago
Problem seem to be that SSH commands are not executed as pseudo ocrd user but as root user. I think that happend cause the local root user has same UID and GID like the root user in the Container and than the default id_rsa file location is expected under /root/.ssh/id_rsa
which not exist. So we must add -i /.ssh/id_rsa
for all SSH commands for that case.
I think that happend cause the local root user has same UID and GID like the root user in the Container and than the default id_rsa file location is expected under
/root/.ssh/id_rsa
which not exist. So we must add-i /.ssh/id_rsa
for all SSH commands for that case.
I doubt that. We set HOME=/
in the Dockerfile and again add a line to /etc/passwd
for the UID of the ocrd
user, which also sets /
as home directory. The default in OpenSSH is ~/.ssh/id_*
. So it should look for /.ssh/id_rsa
.
But (as speculated here), it might be that the tilde expansion does not work for us.
At any rate, let's just add that option to the ssh calls and be done with the problem (whatever the actual cause might be).
On my local system the UID and GID of root is 0. So these ids setted as UID and GID for pseudo user with env variable. But this is UID is already used by root user. So the pseudo user is root.
Here I think is the proof for my assumption:
root@LDV163:/home/weigelt/Work/OCR-D/kitodo_production_ocrd# docker exec -it kitodo_production_ocrd_kitodo-app_1 bash
root@f71d05217d79:/usr/local/tomcat# ssh -i /.ssh/id_rsa -Tn -p 22 ocrd@ocrd-manager whoami
root
When i run make stack (prepare, build and start) with root user, I run into following problem when i execute the
script_ocr.sh
over action:runscript in Kitodo.Production