├── .github ├── FUNDING.yml └── workflows │ ├── buildx.yml │ └── check.yml ├── LICENSE ├── README.md ├── check-version.sh └── create-push-tags.sh /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: yrzr 4 | -------------------------------------------------------------------------------- /.github/workflows/buildx.yml: -------------------------------------------------------------------------------- 1 | name: buildx 2 | 3 | on: 4 | push: 5 | tags: 6 | - "*" 7 | 8 | jobs: 9 | docker: 10 | runs-on: ubuntu-24.04-arm 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v4 14 | with: 15 | fetch-depth: 0 16 | - name: Set up Docker Buildx 17 | uses: docker/setup-buildx-action@v3 18 | - name: Login to container registry 19 | uses: docker/login-action@v3 20 | with: 21 | username: ${{ secrets.REGISTRY_USERNAME }} 22 | password: ${{ secrets.REGISTRY_TOKEN }} 23 | - name: Set variables 24 | shell: bash 25 | run: | 26 | echo "GITLAB_DIR=omnibus-gitlab" >> $GITHUB_ENV 27 | echo "DOCKER_DIR=omnibus-gitlab/docker" >> $GITHUB_ENV 28 | echo "GITLAB_REF_TAG=$(echo ${{ github.ref_name }} | sed 's/\-/\+/')" >> $GITHUB_ENV 29 | DOCKER_NAMESPACE=yrzr/gitlab-ce-arm64v8 30 | LATEST=$(git tag | sort -rV | head -n 1) 31 | if [ "${LATEST}" == "${{ github.ref_name }}" ]; then 32 | echo "IS_LATEST=true">> $GITHUB_ENV 33 | else 34 | echo "IS_LATEST=false">> $GITHUB_ENV 35 | fi 36 | - name: Docker meta 37 | id: meta 38 | uses: docker/metadata-action@v5 39 | with: 40 | images: yrzr/gitlab-ce-arm64v8 41 | flavor: | 42 | latest=${{ env.IS_LATEST }} 43 | tags: | 44 | type=ref,event=tag 45 | type=match,pattern=(.*\..*)\..*-ce\..*,group=1 46 | type=match,pattern=(.*)\..*\..*-ce\..*,group=1 47 | - name: Check out https://github.com/gitlabhq/omnibus-gitlab.git 48 | uses: actions/checkout@v4 49 | with: 50 | repository: gitlabhq/omnibus-gitlab 51 | path: ${{ env.GITLAB_DIR }} 52 | ref: ${{ env.GITLAB_REF_TAG }} 53 | - name: Perpare for building 54 | shell: bash 55 | run: | 56 | echo "PACKAGECLOUD_REPO=gitlab-ce" > ./${{ env.DOCKER_DIR }}/RELEASE 57 | echo "RELEASE_PACKAGE=gitlab-ce" >> ./${{ env.DOCKER_DIR }}/RELEASE 58 | echo "RELEASE_VERSION=${{ github.ref_name }}" >> ./${{ env.DOCKER_DIR }}/RELEASE 59 | echo "DOWNLOAD_URL=https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/jammy/gitlab-ce_${{ github.ref_name }}_arm64.deb/download.deb" >> ./${{ env.DOCKER_DIR }}/RELEASE 60 | # variable name changed and libatomic1 installed since this commit https://github.com/gitlabhq/omnibus-gitlab/commit/ca02e0c220f009a7b0758bb32ff43d20b448d52f 61 | echo "DOWNLOAD_URL_arm64=https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/jammy/gitlab-ce_${{ github.ref_name }}_arm64.deb/download.deb" >> ./${{ env.DOCKER_DIR }}/RELEASE 62 | cat ./${{ env.DOCKER_DIR }}/RELEASE 63 | echo 'sed -i "s\# ignore-warnings ARM64-COW-BUG\ignore-warnings ARM64-COW-BUG\g" /opt/gitlab/embedded/cookbooks/redis/templates/default/redis.conf.erb' >> ./${{ env.DOCKER_DIR }}/assets/setup 64 | - name: Build and Push Image 65 | uses: docker/build-push-action@v6 66 | with: 67 | context: ${{ env.DOCKER_DIR }} 68 | platforms: linux/arm64 69 | push: true 70 | tags: ${{ steps.meta.outputs.tags }} 71 | -------------------------------------------------------------------------------- /.github/workflows/check.yml: -------------------------------------------------------------------------------- 1 | name: check 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: 7 | - master 8 | schedule: 9 | - cron: "30 13 * * *" 10 | 11 | jobs: 12 | check: 13 | runs-on: ubuntu-latest 14 | env: 15 | GIT_USER_EMAIL: "shenleidi@gmail.com" 16 | GIT_USER_NAME: "Christopher SHEN" 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v4 20 | with: 21 | fetch-depth: 0 22 | ssh-key: "${{ secrets.COMMIT_KEY }}" 23 | - name: Find packages 24 | shell: bash 25 | run: | 26 | # git tag 27 | ./check-version.sh 28 | - name: Create and push tags 29 | shell: bash 30 | run: | 31 | ./create-push-tags.sh 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Christopher L.D. SHEN 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GitLab-ce docker image builder for arm64v8 2 | 3 | [![buildx](https://github.com/yrzr/gitlab-ce-arm64v8-docker/actions/workflows/buildx.yml/badge.svg)](https://github.com/yrzr/gitlab-ce-arm64v8-docker/actions/workflows/buildx.yml) 4 | 5 | [![docker hub](https://img.shields.io/docker/pulls/yrzr/gitlab-ce-arm64v8)](https://hub.docker.com/r/yrzr/gitlab-ce-arm64v8) 6 | 7 | Compatible with **arm64v8** architecture. 8 | 9 | Images are built here: https://github.com/yrzr/gitlab-ce-arm64v8-docker 10 | 11 | Docker image: https://hub.docker.com/r/yrzr/gitlab-ce-arm64v8 12 | 13 | Old builds on gitlab-ci: https://git.yrzr.tk/docker/gitlab-ce-arm64 14 | 15 | ## How to use 16 | 17 | The official image (AMD64 only) is [here](https://hub.docker.com/r/gitlab/gitlab-ce/). 18 | 19 | The following is an example of how to use this image. 20 | 21 | ```bash 22 | docker run \ 23 | --detach \ 24 | --restart unless-stopped \ 25 | --name gitlab-ce \ 26 | --privileged \ 27 | --memory 8G \ 28 | --publish 22:22 \ 29 | --publish 80:80 \ 30 | --publish 443:443 \ 31 | --hostname gitlab.example.com \ 32 | --env GITLAB_ROOT_PASSWORD="YourPasswordHere" \ 33 | --env GITLAB_OMNIBUS_CONFIG=" \ 34 | registry['enable'] = false; \ 35 | GITLAB_OMNIBUS[your_other_configs] = `options`; "\ 36 | --volume /srv/gitlab-ce/conf:/etc/gitlab:z \ 37 | --volume /srv/gitlab-ce/logs:/var/log/gitlab:z \ 38 | --volume /srv/gitlab-ce/data:/var/opt/gitlab:z \ 39 | yrzr/gitlab-ce-arm64v8:latest 40 | ``` 41 | 42 | Since `16.2.1-ce.0`, you can also use tags like `yrzr/gitlab-ce-arm64v8:16.2` and `yrzr/gitlab-ce-arm64v8:16`. 43 | 44 | ## Redis problem 45 | 46 | Redis cannot start with its default config on ARM64, which stops gitlab-ce from starting. ~~You have to change the setting manually on a fresh install or an upgrade and then restart gitlab-ce.~~ 47 | 48 | Since version `16.6.0-ce.0`, "ignore-warnings ARM64-COW-BUG" will be added to `redis.conf` on start by default. You no longer need to add it manually. 49 | -------------------------------------------------------------------------------- /check-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SEARCH_PAGES='16' 4 | 5 | if [ -f ./version_list ]; then 6 | rm version_list 7 | fi 8 | 9 | for i in $(seq 1 ${SEARCH_PAGES}); do 10 | curl -s "https://packages.gitlab.com/gitlab/gitlab-ce?page=${i}" | grep "_arm64.deb" | grep -v '\-rc' | sed 's/.*>\(.*\)<.*/\1/' | sort -u | sed 's/gitlab-ce_\(.*\)_arm64.deb/\1/' >> version_list; 11 | done 12 | sort -rVu version_list -o version_list 13 | 14 | echo "Latest versions:" 15 | cat version_list 16 | -------------------------------------------------------------------------------- /create-push-tags.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat version_list | while read version; do 4 | HAVE_TAG=false 5 | 6 | for tag in $(git tag); do 7 | if [ "${version}" == "${tag}" ]; then 8 | HAVE_TAG=true 9 | break 10 | fi 11 | done 12 | 13 | if ! ${HAVE_TAG}; then 14 | echo "Creating and pushing tag ${version}" 15 | git tag ${version} 16 | git push origin ${version} 17 | else 18 | echo "Tag ${version} already exists, skipping" 19 | fi 20 | done 21 | --------------------------------------------------------------------------------