RedpointArchive / phabricator

A Docker image that runs Phabricator, an open source software engineering tool
https://hub.docker.com/r/redpointgames/phabricator/
307 stars 98 forks source link

How to ssh into running container as root user? #3

Closed sanketgajjar closed 8 years ago

sanketgajjar commented 9 years ago

Running the container using below command :

/usr/bin/docker run -p 80:80 -p 2222:22 -p 843:843 -p 22280:22280 -v /home/sanket/hachque/config:/config -v /home/sanket/hachque/repo-storage:/srv/repo --name=phabricator --link mariadb:linked_mariadb hachque/phabricator

hach-que commented 9 years ago

SSH as root on the private IP shown by docker inspect. The password is linux.

sanketgajjar commented 9 years ago

Thanks for responding here, earlier I tried asking questions on docker registry.

I keep getting Permission denied publickey.keyboard-interactive. Is this due to ssh configurations on server blocking password based login ? Any workaround or I have to rebuild image from this source ?

hach-que commented 9 years ago

Oops, I meant to add "connect on port 24" to that previous comment.

Port 22 is used for Phabricator repository hosting; port 24 is the SSH port.

sanketgajjar commented 9 years ago

Awesome, it worked! I may add wiki page once I will complete the test of phabricator.

Also, I was able to create a repository. I set vcspassword and using the below url - please help fix it.

HTTP method : git clone http://myphabricator.com/diffusion/T/test.git username : sanket # I created this user while setting up phabricator for the first time,

error : The requested URL returned error: 403 while accessing http://myphabricator.com/diffusion/T/test.git/info/refs fatal: HTTP request failed.

I have /etc/hosts configured on the host machine so that 127.0.01 is myphabricator.com.

ssh method: git clone ssh://myphabricator.com/diffusion/T/test.git sanket@myphabricator.com's password: Permission denied, please try again.

None of the methods work. Can you please help resolve them ?

franc0is commented 9 years ago

FYI you do not need to run sshd in your containers: http://blog.docker.com/tag/nsenter/

utrack commented 8 years ago

Now you can use docker exec -it <container> bash, btw.

hach-que commented 8 years ago

Yeah I can probably remove the SSH daemon from containers now..

hach-que commented 8 years ago

Closing because this issue is resolved.