How to build docker image for my self-managed gitlab installed from source code?

Hello:

I installed a self-managed Gitlab instance from source code following the documentation and I installed the gitaly, gitlab-pages, gitlab-shell and gitlab-workhorse:

root@cloud:/home/git# ls
gitaly  gitlab  gitlab-elasticsearch-indexer  gitlab-pages  gitlab-shell  gitlab-workhorse  go  repositories

Then I modified some source code of gitlab to add a user cap for specific email domain.

And now, I’m trying to move them into a docker container. I looked up the documentation for installing GitLab via docker and it uses the gitlab latest image: gitlab/gitlab-ee:latest. I wonder what files are in it and how to build my modified gitlab image?

Any help? Really appreciate!