sequenceiq / hadoop-docker

Hadoop docker image
https://registry.hub.docker.com/u/sequenceiq/hadoop-docker/
Apache License 2.0
1.21k stars 561 forks source link

Exposing right ssh port & short info on ssh usage #19

Closed lazyval closed 9 years ago

lazyval commented 9 years ago

Follow up for #7, which changed sshd port from default 22 to 2122

I wish I had more to write about ssh usage, but for me it's not quite clear how one is supposed to log-in. I am using quite hacky way, copying generated ssh keys from container:

docker cp $CONTAINER_ID:/root/.ssh/id_rsa ~/.ssh/hadoop-docker/
ssh -i ~/.ssh/hadoop-docker/id_rsa root@$DOCKER_HOST -p 2122

If I am doing this wrong way, please correct me, and I will update the doc.

matyix commented 9 years ago

Not sure what you'd like to achieve but you should not SSH into a container - use docker exec (if you have 1.3) or nsenter if you'd like to get inside the container.

lazyval commented 9 years ago

@matyix sure, I do know about ssh antipattern, but sadly it is required sometimes (in my particular case it is used for fabric one-off tasks). If you're strictly against using ssh, why is it even configured?

matyix commented 9 years ago

Hadoop core requires passwordless ssh ... it's not for the purpose to SSH in the container

lazyval commented 9 years ago

Okaaay then, closing this. Thanks!