Vauxoo / docker-ssh

Ssh server
0 stars 6 forks source link

[ADD] Adding Dockerfile an entrypoint.sh #1

Closed JesusZapata closed 7 years ago

JesusZapata commented 7 years ago

Create docker container to install ssh-server

JesusZapata commented 7 years ago

@ruiztulio @moylop260

I this PR only install the ssh server Have a customs environment variable SSH_USER and SSH_KEY The documentation is WIP

JesusZapata commented 7 years ago

@ruiztulio Do Could do you review this pull request?

JesusZapata commented 7 years ago

@ruiztulio I applied all your comment in the code.

ruiztulio commented 7 years ago

@JesusZapata LGTM, but is there any issue with the file permissions? because proably the user id from weblate container and the one from ssh won't have the same (I'm not saying this will be an issue, just wondering)

JesusZapata commented 7 years ago

@ruiztulio Good point, I fixed the permission and the owner of the folder .ssh

ruiztulio commented 7 years ago

@JesusZapata goo to see that, but I meant the UID if this is different maybe there could be a problem, but if you tell me that tested this with no issues then is good to me

JesusZapata commented 7 years ago

@ruiztulio I follow the next step to test this docker-ssh

  1. Clone the repository git clone --single-branch --branch master-adding-dockerfile-jesuszapata git@github.com:vauxoo-dev/docker-ssh.git and get in on the docker-ssh folder
  2. Create file .env with the follow content:
    SSH_USER=user
    SSH_KEY=Your ssh keys, to allow ssh login
  3. Build the docker image docker build -t docker-ssh .
  4. Run the docker image docker run --env-file .env -p 2222:22 docker-ssh
  5. Log into the docker-ssh docker ssh -p 2222 user@your.host.com

The different UID of the user is not trouble, for example I test with the user test-ssh but the user test-ssh is not present into the /etc/passwd the user only exist into the docker container

JesusZapata commented 7 years ago

@ruiztulio I recorder one video of that funcionality https://www.youtube.com/watch?v=iGxnTjFzP0c&feature=youtu.be