Gitlab-EE on Docker (MacOS M1) - could not load a Page (Empty reply from server)

Just for education reasons I want to install Gitlab EE on my MacOS using Docker Desktop.

I use command:

sudo docker run --detach \
  --hostname localhost \
  --publish 443:443 --publish 80:80 --publish 22:22 \
  --name gitlab \
  --restart always \
  --volume $GITLAB_HOME/config:/etc/gitlab:Z \
  --volume $GITLAB_HOME/logs:/var/log/gitlab:Z \
  --volume $GITLAB_HOME/data:/var/opt/gitlab:Z \
  --shm-size 2gb \
  --platform linux/amd64 \
  gitlab/gitlab-ee:latest

I could not load a login page. What could be wrong?

I also tried to change the ports, but does not solve the issue

sudo docker run --detach \
  --hostname localhost \
  --publish 8443:443 --publish 8080:80 --publish 8022:22 \
  --name gitlab \
  --restart always \
  --volume $GITLAB_HOME/config:/etc/gitlab:Z \
  --volume $GITLAB_HOME/logs:/var/log/gitlab:Z \
  --volume $GITLAB_HOME/data:/var/opt/gitlab:Z \
  --shm-size 2gb \
  --platform linux/amd64 \
  gitlab/gitlab-ee:latest

I got response for

http://localhost:8080/

This page isn’t workinglocalhost didn’t send any data.
ERR_EMPTY_RESPONSE

macOS Monterey 12.2.1

I tried to replicate your experiment and got the same (failing) results.

I looked into the output of docker logs and it shows that gitlab-ctl reconfigure is failing as the command takes too long to complete.

Presumably the emulation used by Docker (which is not the famous Rosetta2 from Apple but qemu) is not able to provide sufficient performance to run all pieces of GitLab.

Your best chance is probably running a Docker image for arm64 architecture. There are five I found on hub.docker.com, for an experiment I tried this one with success: https://hub.docker.com/r/gsdukbh/gitlab-ee-arm64
These are not official images, so you don’t know exactly what the people have put into the image. You might therefore consider creating your own ARM64-image based on the Omnibus repository.