mirror of
				https://git.yrzr.tk/docker/gitlab-ce-arm64.git
				synced 2025-05-29 05:49:16 +08:00 
			
		
		
		
	Compare commits
	
		
			8 Commits
		
	
	
		
			15.11.11-c
			...
			master
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					aecb56ccc6 | ||
| 
						 | 
					573f6d4dd5 | ||
| 
						 | 
					cee5981a20 | ||
| 
						 | 
					da229acfb8 | ||
| 
						 | 
					784a57aaab | ||
| 
						 | 
					5003d65c74 | ||
| 
						 | 
					e1edd3c19a | ||
| 
						 | 
					1fb23ff747 | 
							
								
								
									
										3
									
								
								.github/FUNDING.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.github/FUNDING.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
			
		||||
# These are supported funding model platforms
 | 
			
		||||
 | 
			
		||||
github: yrzr
 | 
			
		||||
							
								
								
									
										59
									
								
								.github/workflows/buildx.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								.github/workflows/buildx.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,59 @@
 | 
			
		||||
name: buildx
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    tags:
 | 
			
		||||
      - "*"
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  docker:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 0
 | 
			
		||||
      - name: Set up QEMU
 | 
			
		||||
        uses: docker/setup-qemu-action@v2
 | 
			
		||||
      - name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v2
 | 
			
		||||
      - name: Login to container registry
 | 
			
		||||
        uses: docker/login-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          username: ${{ secrets.REGISTRY_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.REGISTRY_TOKEN }}
 | 
			
		||||
      - name: Set variables
 | 
			
		||||
        shell: bash
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "GITLAB_DIR=omnibus-gitlab" >> $GITHUB_ENV
 | 
			
		||||
          echo "DOCKER_DIR=omnibus-gitlab/docker" >> $GITHUB_ENV
 | 
			
		||||
          echo "GITLAB_REF_TAG=$(echo ${{ github.ref_name }} | sed 's/\-/\+/')" >> $GITHUB_ENV
 | 
			
		||||
          DOCKER_NAMESPACE=yrzr/gitlab-ce-arm64v8
 | 
			
		||||
          LATEST=$(git tag | sort -rV | head -n 1)
 | 
			
		||||
          if [ "${LATEST}" == "${{ github.ref_name }}" ]; then 
 | 
			
		||||
            echo "DOCKER_IMAGE_TAGS=${DOCKER_NAMESPACE}:$THIS_TAG,${DOCKER_NAMESPACE}:latest">> $GITHUB_ENV
 | 
			
		||||
          else
 | 
			
		||||
            echo "DOCKER_IMAGE_TAGS=${DOCKER_NAMESPACE}:$THIS_TAG">> $GITHUB_ENV
 | 
			
		||||
          fi
 | 
			
		||||
      - name: Check out https://github.com/gitlabhq/omnibus-gitlab.git
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          repository: gitlabhq/omnibus-gitlab
 | 
			
		||||
          path: ${{ env.GITLAB_DIR }}
 | 
			
		||||
          ref: ${{ env.GITLAB_REF_TAG }}
 | 
			
		||||
      - name: Perpare for building
 | 
			
		||||
        shell: bash
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "PACKAGECLOUD_REPO=gitlab-ce" > ./${{ env.DOCKER_DIR }}/RELEASE
 | 
			
		||||
          echo "RELEASE_PACKAGE=gitlab-ce" >> ./${{ env.DOCKER_DIR }}/RELEASE
 | 
			
		||||
          echo "RELEASE_VERSION=${{ github.ref_name }}"  >> ./${{ env.DOCKER_DIR }}/RELEASE
 | 
			
		||||
          echo "DOWNLOAD_URL=https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/focal/gitlab-ce_${{ github.ref_name }}_arm64.deb/download.deb" >> ./${{ env.DOCKER_DIR }}/RELEASE
 | 
			
		||||
          cat ./${{ env.DOCKER_DIR }}/RELEASE
 | 
			
		||||
          sed -i 's/\-recommends/\-recommends libatomic1/' ./${{ env.DOCKER_DIR }}/Dockerfile
 | 
			
		||||
      - name: Build and Push Image
 | 
			
		||||
        uses: docker/build-push-action@v4
 | 
			
		||||
        with:
 | 
			
		||||
          context: ${{ env.DOCKER_DIR }}
 | 
			
		||||
          platforms: linux/arm64
 | 
			
		||||
          push: true
 | 
			
		||||
          tags: ${{ env.DOCKER_IMAGE_TAGS }}
 | 
			
		||||
							
								
								
									
										30
									
								
								.github/workflows/check.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/check.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,30 @@
 | 
			
		||||
name: check
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  schedule:
 | 
			
		||||
    - cron:  '30 2 * * *'
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  check:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    env:
 | 
			
		||||
      GIT_USER_EMAIL: "shenleidi@gmail.com"
 | 
			
		||||
      GIT_USER_NAME: "Christopher SHEN"
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 0
 | 
			
		||||
      - name: Find packages
 | 
			
		||||
        shell: bash
 | 
			
		||||
        run: |
 | 
			
		||||
          git tag
 | 
			
		||||
          ./check-version.sh
 | 
			
		||||
      - name: Create tags
 | 
			
		||||
        shell: bash
 | 
			
		||||
        run: |
 | 
			
		||||
          ./create-tags.sh
 | 
			
		||||
      - name: Push tags
 | 
			
		||||
        run: |
 | 
			
		||||
          git config --global user.email $GIT_USER_EMAIL && git config --global user.name $GIT_USER_NAME
 | 
			
		||||
          git push --tags 
 | 
			
		||||
@ -1,55 +0,0 @@
 | 
			
		||||
variables:
 | 
			
		||||
  BASENAME: ${CI_PROJECT_NAME}v8
 | 
			
		||||
  DOCKER_TLS_CERTDIR: ""
 | 
			
		||||
 | 
			
		||||
stages:
 | 
			
		||||
  - check
 | 
			
		||||
  - build
 | 
			
		||||
 | 
			
		||||
check:
 | 
			
		||||
  image: docker:git
 | 
			
		||||
  stage: check
 | 
			
		||||
  tags:
 | 
			
		||||
    - docker
 | 
			
		||||
  only:
 | 
			
		||||
    - branches
 | 
			
		||||
  script:
 | 
			
		||||
    - apk add --no-cache --upgrade openssh-client bash curl coreutils
 | 
			
		||||
    - git config --global user.email $GIT_USER_EMAIL && git config --global user.name $GIT_USER_NAME
 | 
			
		||||
    - mkdir -p ~/.ssh && echo "$GITLAB_SSH_PRIV_KEY" > ~/.ssh/id_rsa && ssh-keyscan -H ${CI_SERVER_HOST} > ~/.ssh/known_hosts && chmod -R 0600 ~/.ssh/
 | 
			
		||||
    - git fetch --tags && ./check-version.sh && ./create-tags.sh
 | 
			
		||||
    - git push --tags https://${GITLAB_USER_LOGIN}:${PERSONAL_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}.git
 | 
			
		||||
 | 
			
		||||
build:
 | 
			
		||||
  image: docker:git
 | 
			
		||||
  stage: build
 | 
			
		||||
  services:
 | 
			
		||||
    - name: docker:dind
 | 
			
		||||
      alias: docker
 | 
			
		||||
  tags:
 | 
			
		||||
    - aarch64
 | 
			
		||||
    - docker
 | 
			
		||||
  only:
 | 
			
		||||
    - tags
 | 
			
		||||
  before_script:
 | 
			
		||||
    - docker info
 | 
			
		||||
  script:
 | 
			
		||||
    - apk add --no-cache --upgrade bash coreutils
 | 
			
		||||
    # fetch dockerfile
 | 
			
		||||
    - BRANCH_NAME=$(echo ${CI_COMMIT_TAG} | sed 's/\-/\+/') && echo ${BRANCH_NAME}
 | 
			
		||||
    - if [ ! -z "$httpProxy" ]; then git config --global http.proxy $httpProxy; fi
 | 
			
		||||
    - git clone -b ${BRANCH_NAME} --depth=1 https://gitlab.com/gitlab-org/omnibus-gitlab.git
 | 
			
		||||
    - cd ./omnibus-gitlab/docker
 | 
			
		||||
    # write RELEASE
 | 
			
		||||
    - echo "PACKAGECLOUD_REPO=gitlab-ce" > RELEASE && echo "RELEASE_PACKAGE=gitlab-ce" >> RELEASE && echo "RELEASE_VERSION=${CI_COMMIT_TAG}"  >> RELEASE && echo "DOWNLOAD_URL=https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/focal/gitlab-ce_${CI_COMMIT_TAG}_arm64.deb/download.deb" >> RELEASE
 | 
			
		||||
    # missing package libatomic1 after version 13
 | 
			
		||||
    - sed -i 's/\-recommends/\-recommends libatomic1/' Dockerfile
 | 
			
		||||
    # debian has /etc/os-release instead of /etc/lsb-release
 | 
			
		||||
    - sed -i 's/lsb-release/os-release/' assets/setup
 | 
			
		||||
    # build
 | 
			
		||||
    - docker build -t ${DOCKER_NS}/${BASENAME}:${CI_COMMIT_TAG} -f Dockerfile ./
 | 
			
		||||
    # latest tag
 | 
			
		||||
    - cd ../../ && git fetch --tags && ./latest-tag.sh
 | 
			
		||||
    # docker push
 | 
			
		||||
    - docker login --username ${DOCKER_USERNAME} --password ${DOCKER_PASSWORD} 
 | 
			
		||||
    - docker images && docker push -a ${DOCKER_NS}/${BASENAME}
 | 
			
		||||
							
								
								
									
										49
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										49
									
								
								README.md
									
									
									
									
									
								
							@ -1,7 +1,48 @@
 | 
			
		||||
# GitLab Community Edition docker image builder for arm64v8
 | 
			
		||||
# GitLab-ce docker image builder for arm64v8
 | 
			
		||||
 | 
			
		||||
Compatible with arm64v8 architectural.
 | 
			
		||||
Compatible with **arm64v8** architectural.
 | 
			
		||||
 | 
			
		||||
Source build code: https://gitlab.com/gitlab-org/omnibus-gitlab
 | 
			
		||||
Images are built here: https://github.com/yrzr/gitlab-ce-arm64v8-docker
 | 
			
		||||
 | 
			
		||||
docker hub: https://hub.docker.com/r/yrzr/gitlab-ce-arm64v8
 | 
			
		||||
Docker image: https://hub.docker.com/r/yrzr/gitlab-ce-arm64v8
 | 
			
		||||
 | 
			
		||||
Old builds on gitlab-ci: https://git.yrzr.tk/docker/gitlab-ce-arm64
 | 
			
		||||
 | 
			
		||||
## How to use
 | 
			
		||||
 | 
			
		||||
The official image (AMD64 only) is [here](https://hub.docker.com/r/gitlab/gitlab-ce/).
 | 
			
		||||
 | 
			
		||||
The following is an example of how to use this image.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
docker run \
 | 
			
		||||
  --detach \
 | 
			
		||||
  --restart unless-stopped \
 | 
			
		||||
  --name gitlab-ce \
 | 
			
		||||
  --privileged \
 | 
			
		||||
  --memory 8G \
 | 
			
		||||
  --publish 22:22 \
 | 
			
		||||
  --publish 80:80 \
 | 
			
		||||
  --publish 443:443 \
 | 
			
		||||
  --publish 127.0.0.1:8181:8181 \
 | 
			
		||||
  --hostname gitlab.example.com \
 | 
			
		||||
  --env GITLAB_ROOT_PASSWORD="YourPasswordHere" \
 | 
			
		||||
  --env GITLAB_OMNIBUS_CONFIG=" \
 | 
			
		||||
    registry['enable'] = false; \
 | 
			
		||||
    GITLAB_OMNIBUS[your_other_configs] = here; "\
 | 
			
		||||
  --volume /srv/gitlab-ce/conf:/etc/gitlab:z \
 | 
			
		||||
  --volume /srv/gitlab-ce/logs:/var/log/gitlab:z \
 | 
			
		||||
  --volume /srv/gitlab-ce/data:/var/opt/gitlab:z \
 | 
			
		||||
  yrzr/gitlab-ce-arm64v8:latest
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Redis problem
 | 
			
		||||
 | 
			
		||||
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.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
# change the path to your redis.conf
 | 
			
		||||
echo "ignore-warnings ARM64-COW-BUG" >> /srv/gitlab-ce/data/redis/redis.conf
 | 
			
		||||
# restart docker container
 | 
			
		||||
docker restart gitlab-ce
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
@ -1,7 +0,0 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
LATEST=$(git tag | sort -rV | head -n 1)
 | 
			
		||||
 | 
			
		||||
if [ "${LATEST}" == "${CI_COMMIT_TAG}" ]; then 
 | 
			
		||||
    docker tag ${DOCKER_NS}/${BASENAME}:${CI_COMMIT_TAG} ${DOCKER_NS}/${BASENAME}:latest;
 | 
			
		||||
fi
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user