title: docker: gitlab + traefik & port 22
body: <p>I need to set up Gitlb behind Traefik.</p>
  
  <p>Everything works except authentication to the app via command line - I don't know how to expose port 22 via traefik.</p>
  
  <p>Any idea how to set it up? How to expose port 22 of a docker container (via traefik)?</p>
  
  <p>I changed the default port from 22 to 10022. </p>
  
  <p>I'm getting via <code>netstat -tulpn</code></p>
  
  <pre><code>Active Internet connections (only servers)
  Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
  tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1132/sshd           
  tcp        0      0 0.0.0.0:5355            0.0.0.0:*               LISTEN      1126/systemd-resolv 
  tcp6       0      0 :::22                   :::*                    LISTEN      1132/sshd           
  tcp6       0      0 :::443                  :::*                    LISTEN      1590/docker-proxy   
  tcp6       0      0 :::10022                :::*                    LISTEN      1440/docker-proxy   
  tcp6       0      0 :::5355                 :::*                    LISTEN      1126/systemd-resolv 
  tcp6       0      0 :::80                   :::*                    LISTEN      1602/docker-proxy   
  tcp6       0      0 :::8080                 :::*                    LISTEN      1578/docker-proxy   
  udp        0      0 127.0.0.53:53           0.0.0.0:*                           1126/systemd-resolv 
  udp        0      0 0.0.0.0:68              0.0.0.0:*                           864/dhclient        
  udp        0      0 0.0.0.0:5355            0.0.0.0:*                           1126/systemd-resolv 
  udp6       0      0 :::5355                 :::*                                1126/systemd-resolv 
  </code></pre>
  
  <p>I don't understand why 10022 is connected to docker-proxy. </p>
  
  <p>When I try:</p>
  
  <pre><code>git push --set-upstream origin master
  ssh: connect to host git.myserver.com port 10022: Connection refused
  fatal: Could not read from remote repository.
  </code></pre>
  
  <p>Thank you very much</p>