Reputation: 61
this is my run commad:
sudo docker run --detach \
--hostname localgitlab.com \
--publish 9443:443 --publish 9980:80 --publish 9922:22 \
--name gitlab \
--restart always \
--volume ~/gitlab/config:/etc/gitlab: \
--volume ~/gitlab/logs:/var/log/gitlab: \
--volume ~/gitlab/data:/var/opt/gitlab: \
--platform linux/amd64 --privileged=true \
gitlab/gitlab-ce:latest
but it stops here
Recipe: gitlab::database_migrations
* ruby_block[check remote PG version] action nothing (skipped due to action :nothing)
* rails_migration[gitlab-rails] action run
I'm not sure if I can use a m1 mac as a gitlab server?
And I set up gitlab successful on my inter chip mac.
Anybody knows the reason?
Upvotes: 6
Views: 3964
Reputation: 81
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"
Upvotes: 2