docker-compose.yaml
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'localhost'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://localhost:9010'
gitlab_rails['gitlab_shell_ssh_port'] = 2022
ports:
- '9010:9010'
- '2022:22'
volumes:
- '/srv/gitlab/config:/etc/gitlab'
- '/srv/gitlab/logs:/var/log/gitlab'
- '/srv/gitlab/data:/var/opt/gitlab'
起動
sudo docker-compose up -d
パスワードと自分用のユーザーを作るとログインできる

Gitが使えるかチェック

yuta@DESKTOP-V36210S:/mnt/c/VampireDesire/Gitlab$ git clone http://localhost:9010/yuta/test.git Cloning into 'test'... Username for 'http://localhost:9010': yuta Password for 'http://yuta@localhost:9010': warning: You appear to have cloned an empty repository. yuta@DESKTOP-V36210S:/mnt/c/VampireDesire/Gitlab$ yuta@DESKTOP-V36210S:/mnt/c/VampireDesire/Gitlab$ cd test/ yuta@DESKTOP-V36210S:/mnt/c/VampireDesire/Gitlab/test$ touch aaa yuta@DESKTOP-V36210S:/mnt/c/VampireDesire/Gitlab/test$ git add aaa yuta@DESKTOP-V36210S:/mnt/c/VampireDesire/Gitlab/test$ git commit -m "a" [master (root-commit) 7f6eb2e] a 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 aaa yuta@DESKTOP-V36210S:/mnt/c/VampireDesire/Gitlab/test$ git push Username for 'http://localhost:9010': yuta Password for 'http://yuta@localhost:9010': Counting objects: 3, done. Writing objects: 100% (3/3), 205 bytes | 10.00 KiB/s, done. Total 3 (delta 0), reused 0 (delta 0) To http://localhost:9010/yuta/test.git * [new branch] master -> master yuta@DESKTOP-V36210S:/mnt/c/VampireDesire/Gitlab/test$ yuta@DESKTOP-V36210S:/mnt/c/VampireDesire/Gitlab/test$
でけた

こんな簡単にGitlab使えるのか、すごいっすね
参考。ありがとうございます!
https://qiita.com/ryuichi1208/items/1c08523b0ef34d05026f
