0

I created my custom image based on Centos and deployed it to Jelastic but I found I can't SSH into my container.

After some troubleshooting I found SSH was not installed in my container so added open-ssh to my container but it was still not working, I can't run "service" command in my container, then I tried different ways trying to get around of it but I still can't get it through.

I want to know am I on the right track? what is the best way to remote SSH to my container created based my custom image? Is SSH required?

Many thanks!

J.

J John
  • 5,591
  • 3
  • 11
  • 9

3 Answers3

0

I founder an easier way - using the image(lemonbar/centos6-ssh) which already has SSH installed. It is working, but I don't know the difference, but at least I can move forward!

J John
  • 5,591
  • 3
  • 11
  • 9
0

You can't just launch a process in the background as the only task in the container, something must keep running in the foreground to keep it alive, even if it is a non-deamonized server.

Besides that, in Centos 6.x to be able to login to openash you should disable PAM in sshd_config.

A better option could be not sshing right into the container, but to the host, and from there use docker exec -i -t to run a shell in the container.

gmuslera
  • 415
  • 2
  • 2
0

Due to latest versions of ubuntu/debian/centos use systemd system daemon which have problems running inside Odin Containers without proper patching such a most recent versions of these OS'es won't work when created with Jelastic. Jelastic is aware of the issue and working on solution which will solve it. ETA ~2 weeks.

Also, please could you provide me with the DockerHub project page that you wants to deploy?

leo
  • 346
  • 1
  • 7