Alternative to SSH-ing into the docker image

(Dean Taylor) #1

A blog post worth a read - points out alternatives to running SSHd inside a docker image.

Specifically mentions use of nsenter: GitHub - jpetazzo/nsenter

It would be interesting to see these practices put into place within the Discourse image, it might also remove the previously troublesome SSH insertion of SSH keys into the image.

(Jeff Atwood) #2

This looks interesting, should we add it as a launcher command before V1 @sam?

(Sam Saffron) #3

I implemented

./launcher enter app

There are some minor caveats.

  1. It needs to escalate priv to root (does it automatically)
  2. It is missing the nice MOTD commands we get with SSH

It does seem to work though.

So, we have a backdoor in, if people do not enable ssh.


Great suggestion. I spent a lot of time trying to figure out the SSH key issue (since my initial confirmation email is not being sent). I still don’t understand how to set the SSH key. The tutorials should be updated to explain if the email is not going through, setup the admin with this command. Much easier than trying to troubleshoot smtp issues, etc when all you want to do is demo the product on a VM.

(Jeff Atwood) #5

You don’t have to set the SSH key, it is set automatically for the root account if you follow the default install instructions.


Hmm… not sure what the “default” instructions are:

I followed this guide for installing Ubuntu on Virtualbox (right up to additional-system-packages):

Then followed this guide: discourse/ at master · discourse/discourse · GitHub

My conf. emails were not going through, so I tried to sudo ./launcher ssh app I was getting a password error.

(Kane York) #7

The first guide is deprecated, you shouldn’t use it. I recommend starting over with a fresh VM following the docker/DO guide, replacing buying a droplet with creating a new VM.


That’s pretty much what I did. I used the Ubuntu install guide just to configure the server install, then used the docker/DO guide to install Discourse.