当我在m1macmini上通过docker安装gitlab-ce时,它会卡住gitlab::database::migr



这是我的运行命令:

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

但在此处停止

Recipe: gitlab::database_migrations
* ruby_block[check remote PG version] action nothing (skipped due to action :nothing)
* rails_migration[gitlab-rails] action run

我不确定我是否可以使用m1 mac作为gitlab服务器?

我在我的芯片间mac上成功地建立了gitlab。

有人知道原因吗?

Gitlab论坛上有一篇文章讨论了这个问题,但没有解决方案。

到目前为止,我找到的唯一解决方案是使用yrzr/gitlab-ce-arm64v8映像,而不是官方的gitlab映像。此图像与arm64兼容,并与官方图像同时发布。

与EE版本的GitLab类似的图像是gsdukbh/GitLab-EE-arm64,它得到了维护,但并不包含所有版本。

顺便说一句,如果你想试试的话,这是我在Mac M1上测试的docker-compose.yml:

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"

最新更新