There is a post in Gitlab forums discussing this but there is no solution.
The only solution I found so far is to use the yrzr/gitlab-ce-arm64v8 image instead of the official GitLab one. This image is built with arm64 compatibility and released at the same time as the official image.
A similar image with the EE version of GitLab is here gsdukbh/gitlab-ee-arm64, it is maintained but it doesn't contain all the versions.
BTW, this is my docker-compose.yml tested on a Mac M1 if you want to give it a try:
version: "3.4"
services:
gitlab:
image: 'yrzr/gitlab-ce-arm64v8'
restart: always
hostname: 'gitlab.local'
container_name: gitlab-ce
privileged: true
depends_on:
- postgresql
links:
- postgresql:postgresql
environment:
GITLAB_OMNIBUS_CONFIG: |
postgresql['enable'] = true
gitlab_rails['db_username'] = "gitlab"
gitlab_rails['db_password'] = "gitlab"
gitlab_rails['db_host'] = "postgresql"
gitlab_rails['db_port'] = "5432"
gitlab_rails['db_database'] = "gitlabhq_production"
gitlab_rails['db_adapter'] = 'postgresql'
gitlab_rails['db_encoding'] = 'utf8'
external_url 'http://gitlab.local'
ports:
- "8080:80"
- "8043:443"
- "8022:22"
volumes:
- ./gitlab-config:/etc/gitlab
- ./gitlab-logs:/var/log/gitlab
- ./gitlab-data:/var/opt/gitlab
postgresql:
restart: always
image: postgres:13.6-alpine
container_name: gitlab-postgres
environment:
- POSTGRES_USER=gitlab
- POSTGRES_PASSWORD=gitlab
- POSTGRES_DB=gitlabhq_production
- TZ=America/Bogota
- PGDATA=/data
volumes:
- ./gitlab-db-data:/data
ports:
- "5432:5432"