If the GitLab installer and/or uninstaller it return(s):
Error response from daemon: driver failed programming external connectivity on endpoint gitlab (<somelongcode>): Error starting userland proxy: listen tcp4 0.0.0.0:22: bind: address already in use.
run:
sudo lsof -i -P -n | grep 22
and identify which process nrs are running on port 22, e.g.:
sshd 1234 root 3u IPv4 23423 0t0 TCP *:22 (LISTEN)
then kill all those processes
sudo kill 1234
then run this script again.
You can check how long it takes before the gitlab server is completed running with:
sudo docker logs -f gitlab