Giter Site home page Giter Site logo

zengxs / gitlab-arm64 Goto Github PK

View Code? Open in Web Editor NEW
109.0 6.0 24.0 84 KB

GitLab docker image (CE & EE) for arm64

License: Apache License 2.0

Dockerfile 10.91% Shell 60.74% Ruby 7.49% Python 20.86%
docker docker-image gitlab arm64 arm dockerfile gitlab-ce gitlab-ee

gitlab-arm64's Introduction

GitLab Docker Image for ARM64

build-badge Docker Pulls Docker Image Size (tag) Docker Image Size (tag) Docker Image Version (latest by date) Docker Image Version (latest by date)

Overview

As the tech landscape evolves, ARM servers are gaining traction for their compact design, cost-effectiveness, and energy efficiency. Major cloud providers, including AWS, Azure, Google Cloud, Oracle Cloud, and Huawei Cloud, are expanding their offerings to include ARM-based solutions.

Despite this trend, the official GitLab Docker image lacks an ARM64 variant, posing a challenge for ARM users who wish to leverage GitLab. Although GitLab has long supported ARM64, this compatibility hasn't extended to its official Docker image.

Our project addresses this gap by providing a GitLab Docker image tailored for ARM64, utilizing GitLab's own Dockerfile as a foundation.

Source Dockerfile: https://gitlab.com/gitlab-org/omnibus-gitlab/-/tree/master/docker

This initiative enhances the official Dockerfile with minimal modifications to ensure ARM64 compatibility.

Usage

Our goal is to deliver an ARM64 image that mirrors the official x86_64 version in functionality. You can deploy this image just as you would the standard release.

For installation guidance, refer to the official Docker documentation:

Acquiring the Image

Downloading Pre-built Images

From version 13.12 onwards, we've been consistently compiling pre-built ARM64 images. Explore the entire range of versions on DockerHub.

Edition Information

The Community Edition (CE) is the open-source version that's freely available without GitLab's official backing.

The Enterprise Edition (EE) encompasses the full-feature set of GitLab and, while also free, offers paid upgrades for enhanced capabilities and official support.

GitLab endorses the EE version for all users. For further details, please visit https://about.gitlab.com/install/ce-or-ee/.

Multi-Architecture Support

As of version 16.0.4, our images support multiple architectures, accommodating environments with mixed x86-64 and ARM64 hardware. The ARM64 images are produced via GitHub Actions, while the x86-64 images are sourced directly from the official GitLab builds.

This unified tagging system means you can pull the correct image for your architecture without having to specify it explicitly. For x86-64 systems, the official GitLab image will be retrieved, whereas ARM64 systems will receive the image compiled by this project.

For ARM64-only images, append the -arm64 suffix to the tag name. Prior to version 16.0.4, images were exclusively ARM64 and did not require the suffix.

Update Strategy

The update process for our image is semi-automated. A GitHub Action is configured to scan for new releases from the upstream source every day. If there are any, it automatically creates a pull request with the updates. However, these pull requests require my manual oversight to ensure there are no critical changes in the upstream Dockerfile that could affect our build. While I strive to merge updates promptly, there may be occasions when a pull request isn't noticed right away. Typically, the delay won't exceed one week.

When it comes to versioning, once a new minor release is available (indicated by an increment in the middle digit of the version number), I will shift focus to that new release. For example, if we're at version 16.6.2 and 16.7.0 is released, I will transition to the latest version. Subsequent patch updates for the 16.6.x series will not be maintained. I understand this may cause inconvenience, and I apologize for any issues this might cause. The limitation arises from a practical standpoint, as maintaining multiple versions concurrently is beyond my current capacity.

Retrieving Images from DockerHub

# Fetch the latest version (defaults to CE)
docker pull zengxs/gitlab:latest

# Fetch the latest EE version
docker pull zengxs/gitlab:ee

# Fetch a specific CE release
docker pull zengxs/gitlab:16.7.3-ce.0

Building the Image Yourself

Requirements: ARM64 Linux system with Docker.

  1. Clone the repository:

    git clone https://github.com/zengxs/gitlab-arm64
  2. Select the GitLab version to build:

    Example version: 16.7.3-ce.0

    Visit https://packages.gitlab.com/gitlab/gitlab-ce or https://packages.gitlab.com/gitlab/gitlab-ee for a list of available versions.

  3. Compile the image:

    cd gitlab-arm64
    # Compile the CE version of GitLab
    docker build . \
       -t gitlab-ce:16.7.3-ce.0 \
       --build-arg RELEASE_PACKAGE=gitlab-ce \
       --build-arg RELEASE_VERSION=16.7.3-ce.0
    # Compile the EE version of GitLab
    docker build . \
       -t gitlab-ee:16.7.3-ee.0 \
       --build-arg RELEASE_PACKAGE=gitlab-ee \
       --build-arg RELEASE_VERSION=16.7.3-ee.0

Contributing

I welcome everyone in the community to contribute to this project! If you're working with ARM64 or x86-64 and run into any issues or have questions during deployment, please feel free to reach out. I am committed to assisting you and providing answers to the best of my ability.

I also invite you to submit pull requests. If you come across a problem that is specific to the ARM64 architecture (and not present in the official x86-64 version), your contributions are highly appreciated. By sharing your fixes and enhancements, you can help improve the project for all ARM64 users.

Let's work together to ensure the GitLab Docker image is as reliable and user-friendly as possible. Your input and contributions can make a significant difference!

gitlab-arm64's People

Contributors

ronsudomo avatar sonjek avatar zengxs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gitlab-arm64's Issues

Editions explanation not quite right (for self-hosted instances)

Hi

CE represents the community edition, which is open source and free. EE represents the enterprise edition, which includes more features but requires a license purchased from GitLab B.V..

The description about GitLab CE/EE is not quite correct. The actual difference is that (if you self-host you instance) you only be able to upgrade to a paid tier if you are on EE but not CE.

求救:runsv not running错误

mac电脑m2芯片arm64架构,准备在docker上部署gitlab-ce,遇到一个问题:

  • execute【/opt/gitlab/bin/gitlab-ctl start postgresql】 action run
    【execute】 fail: redis: runsv not running
    【execute】 fail: redis: runsv not running
    该问题是我使用docker compose绑定数据卷时出现的错误(gitlab启动不起来),不绑定数据卷不会出现该错误。
    绑定数据卷的docker compose如下:
    绑定数据卷的docker compose如下:
# 版本
version: "2.1"
# 服务
services:
  # 服务名
  gitlab-ce-ser:
    # 镜像 macOS arm64芯片
    image: "yrzr/gitlab-ce-arm64v8:latest"
    # image: "gitlab/gitlab-ce:latest"
    # 容器名
    container_name: "gitlab-ce"
    # 重启策略 失败一直重启
    restart: always
    hostname: "127.0.0.1"
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        # external_url 'https://gitlab.example.com'
        # Add any other gitlab.rb configuration here, each on its own line
    ports:
      - "9090:80"
      - "9043:443"
      - "9022:22"
    volumes:
      - type: bind
        source: ${GITLAB_HOME}/config
        target: /etc/gitlab
      - type: bind
        source: ${GITLAB_HOME}/logs
        target: /var/log/gitlab
      - type: bind
        source: ${GITLAB_HOME}/data
        target: /var/opt/gitlab
    shm_size: "256m"

不绑定数据卷的docker compose 注销掉数据卷相关行即可。

绑定数据卷时,数据卷绑定是正常的,就是一旦绑定数据卷就会报上面的错误,请老师指教。十分感谢!

关于更低版本的 GitLab 镜像制作问题

hub 主你好,非常感谢你的付出。

有个问题我想请教一下,对于更低的版本来说,官方是不是没有支持 ARM 架构了呢?

图片

比如我是 M2 的 MacBook Pro,其实想复刻一下我司的 GitLab 环境验证一些问题,不过貌似这个版本是不支持的:

图片

其它比较高的版本倒是没问题。

图片

我想问,如果官方没有支持,还有什么办法能够构建更低的版本镜像使其在 ARM 架构上运行吗?

start的时候报错了,找了很久没找到解决方案,来请教一下

image

2023-12-07 14:27:21     ================================================================================
2023-12-07 14:27:21     Error executing action `create` on resource 'database_objects[postgresql]'
2023-12-07 14:27:21     ================================================================================
2023-12-07 14:27:21     
2023-12-07 14:27:21     RuntimeError
2023-12-07 14:27:21     ------------
2023-12-07 14:27:21     postgresql_user[gitlab] (postgresql::standalone line 21) had an error: RuntimeError: execute[create gitlab postgresql user] (postgresql::standalone line 13) had an error: RuntimeError: PostgreSQL did not respond before service checks were exhausted
2023-12-07 14:27:21     
2023-12-07 14:27:21     Cookbook Trace: (most recent call first)
2023-12-07 14:27:21     ----------------------------------------
2023-12-07 14:27:21     /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helpers/pg_status_helper.rb:56:in `ready?'
2023-12-07 14:27:21     /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helpers/base_pg_helper.rb:28:in `is_ready?'
2023-12-07 14:27:21     /opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/resources/user.rb:16:in `block (3 levels) in class_from_file'
2023-12-07 14:27:21     /opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/resources/user.rb:13:in `block in class_from_file'
2023-12-07 14:27:21     /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/database_objects.rb:21:in `block in class_from_file'
2023-12-07 14:27:21     

Connection troubles

All ports except 22 do not work. The connection is reset.

docker-compose.yml:

version: '3.6'
services:
  web:
    image: 'zengxs/gitlab:ee' # Also: "image: 'zengxs/gitlab:latest'" or "image: 'zengxs/gitlab:ce'"
    restart: always
    hostname: 'localhost'
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'http://localhost'
        gitlab_rails['gitlab_shell_ssh_port'] = 2222
        # Add any other gitlab.rb configuration here, each on its own line
    ports:
      - "3000:80"
      - "3001:443"
      - "2222:22"
    volumes:
      - ./config:/etc/gitlab
      - ./logs:/var/log/gitlab
      - ./data:/var/opt/gitlab
    shm_size: '256m'
1

permission issue

I tried to run the gitlab ee docker image on mini mac by the following command:
sudo docker run --detach --hostname mini-mac --publish 8443:443 --publish 8080:80 --publish 8022:22 --name gitlab --restart always --volume $GITLAB_HOME/config:/etc/gitlab --volume $GITLAB_HOME/logs:/var/log/gitlab --volume $GITLAB_HOME/data:/var/opt/gitlab --shm-size 256m zengxs/gitlab:ee

but got the following access error:

  Relevant File Content:
  ----------------------
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:

   34:  include_recipe 'postgresql::directory_locations'
   35:
   36:  directory "/etc/gitlab" do
   37:    owner "root"
   38:    group "root"
   39:    mode "0775"
   40:    only_if { node['gitlab']['manage_storage_directories']['manage_etc'] }
   41>> end.run_action(:create)
   42:
   43:  node.default['gitlab']['bootstrap']['enable'] = false if File.exist?("/var/opt/gitlab/bootstrapped")
   44:
   45:  directory "Create /var/opt/gitlab" do
   46:    path "/var/opt/gitlab"
   47:    owner "root"
   48:    group "root"
   49:    mode "0755"
   50:    recursive true

  System Info:
  ------------
  chef_version=17.10.0
  platform=ubuntu
  platform_version=22.04
  ruby=ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [aarch64-linux]
  program_name=/opt/gitlab/embedded/bin/cinc-client
  executable=/opt/gitlab/embedded/bin/cinc-client


  Running handlers:
[2023-08-11T00:46:07+00:00] ERROR: Running exception handlers
  Running handlers complete
There was an error running gitlab-ctl reconfigure:

directory[/etc/gitlab] (gitlab::default line 36) had an error: Errno::EACCES: Permission denied @ apply2files - /etc/gitlab

[2023-08-11T00:46:07+00:00] ERROR: Exception handlers complete
  Infra Phase failed. 0 resources updated in 01 seconds
[2023-08-11T00:46:07+00:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
[2023-08-11T00:46:07+00:00] FATAL: ---------------------------------------------------------------------------------------
[2023-08-11T00:46:07+00:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2023-08-11T00:46:07+00:00] FATAL: ---------------------------------------------------------------------------------------
[2023-08-11T00:46:07+00:00] FATAL: Errno::EACCES: directory[/etc/gitlab] (gitlab::default line 36) had an error: Errno::EACCES: Permission denied @ apply2files - /etc/gitlab
Thank you for using GitLab Docker Image!
Current version: =

Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
And restart this container to reload settings.
To do it use docker exec:

  docker exec -it gitlab editor /etc/gitlab/gitlab.rb
  docker restart gitlab

For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

If this container fails to start due to permission problems try to fix it by executing:

  docker exec -it gitlab update-permissions
  docker restart gitlab
 

Then try to chmod 777 or 766 $GITLAB_HOME, still have the same error.

zengxs/gitlab:16.5-ee rake aborted

Hi,

I just noticed zengxs/gitlab:16.5-ee fails on boot after upgrading from zengxs/gitlab:16.4-ee with:

gitlab-web-1     | gitlab Reconfigured!
gitlab-web-1     | Checking for unmigrated data on legacy storage
gitlab-web-1     | Upgrade failed. Could not check for unmigrated data on legacy storage.
gitlab-web-1     |
gitlab-web-1     | rake aborted! Don't know how to build task 'gitlab:storage:legacy_attachments' (See the list of available tasks with 'rake --tasks') Did you mean? gitlab:db:truncate_legacy_tables:main /opt/gitlab/embedded/bin/bundle:25:in 'load' /opt/gitlab/embedded/bin/bundle:25:in '<main>' (See full trace by running task with --trace)
gitlab-web-1     |
gitlab-web-1     |
gitlab-web-1     | If you would like to restart the instance without performing this
gitlab-web-1     | check, add the following to your docker command:
gitlab-web-1     | -e GITLAB_SKIP_UNMIGRATED_DATA_CHECK=true

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.