1

I have the following setup

An Ubuntu 14.04 Linode running a GitLab CE docker instance. I use NGinx as a reverse proxy for all web-traffic, the servername gitlab.xxx.be is used to access the web interface.

As for web-related stuff, i have no problem in configuring ... but SSH is a problem. How can I get SSH git access up & running?

Basically I need to forward all SSH traffic for gitlab.xxx.be from my linode server to the docker instance. How can this be done easily?

Thx for the help ...

user88687
  • 113
  • 5

1 Answers1

1

Basically I need to forward all SSH traffic for gitlab.xxx.be from my linode server to the docker instance. How can this be done easily?

OpenSSH server daemon must be running on your docker container. If the used docker image does not provision OpenSSH, so you need to create a Dockerfile inheriting from that GitLab image, extend it with SSH capability, build the new image and run a new container.

If you are using this image, OpenSSH must be included https://hub.docker.com/r/gitlab/gitlab-ce/~/dockerfile/

Generate an SSH key and put the public key inside the file /var/opt/gitlab/.ssh/authorized_keys (OpenSSH public key format).

And in the same you made the port forwarding Nginx -> GitLab Web interface running on Docker, you can also forward any available port from the host system to the SSH port in the running docker container (dummy example: docker run -d --name appName -p 2222:22 -v gitlab_data gitlab_image).

Wahid
  • 26
  • 1