Logging to gitlab container after startup

First time gitlab user.

I start up the container like this:

docker run
–hostname localhost
–publish 8929:8929 --publish 2289:22
–name gitlab
-v $(pwd)/config:/etc/gitlab
-v $(pwd)/logs:/var/log/gitlab
-v $(pwd)/data:/var/opt/gitlab
–shm-size 256m
“$img”

The container starts up. I then
cd config and try this

ssh localhost -p 2289 -i ./ssh_host_rsa_key
root@localhost: Permission denied (publickey).

I don’t believe you can login via SSH, or at least I haven’t been able to.

If you want to get into the container you could run:

docker exec -it $(docker ps | awk '/gitlab/ { print $1 }') bash

C.

1 Like

Thanks mate