0

While trying to start GitLab in a Docker container I am experiencing some issues. The command does works on other pc's. The command consists of:

sudo docker run --detach \
  --hostname 127.0.0.1 \
  --publish 443:443 --publish 80:80 --publish 22: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 \
  gitlab/gitlab-ce:latest

Next, I inspect how gitlab is starting up with command:

sudo docker logs -f gitlab

Which displays the following error:

standard_init_linux.go:219: exec user process caused: exec format error

According to perara in this link that might be caused to a difference in the architecture of the Raspberry Pi 4b (4gb) and the architecture that is used by gitlab-ce:latest. So I tried various other architectures by including the following platform arguments (one per run):

--platform /linux/arm/v7
--platform /linux/amd64
--platform /linux/arm64
--platform /linux/armhf

which yielded error:

docker: Error response from deamon: image with reference gitlab/gitlab-ce:latest was found but does not match the specified platform wanted linux/arm64, actual: linux/amd64.

So it seems like I am not finding the right docker image of Gitlab for the right architecture of the Raspberry Pi model 4b with 4Gb. I ran these commands on the Ubuntu Server 20.04 LTS 32bit armhf OS.

So I would like to ask, how could I run GitLab through docker on Ubuntu Server on a Raspberry Pi 4b (4gb)? E.g. should I use a different Ubuntu Server OS version, and/or specify a different platform argument, and/or get a different source than gitlab/gitlab-ce:latest?

3 Answers 3

3

Sadly at the time of this writing GitLab doesn't seem to officially support GitLab-CE on ARM with docker. Their only documented procedure for running CE on ARM is with Debian Buster and GitLabs official package repository.
https://docs.gitlab.com/omnibus/settings/rpi.html

There is a seemingly popular 3rd party build of CE for Docker ARM but it's only for arm64, so you'd need to run a 64bit distro.
https://hub.docker.com/r/yrzr/gitlab-ce-arm64v8
https://git.yrzr.tk/docker/gitlab-ce-arm64

To switch to using the 3rd party images you'll need to run a 64bit distro and should only need to replace

gitlab/gitlab-ce:latest

with

yrzr/gitlab-ce-arm64v8:latest

in your run command

1
  • Thanks! +1 Still... gitlab does not work on raspberry pi in 2023. Using this method helped
    – LtMuffin
    Commented Mar 1, 2023 at 2:28
1

For those who don't want to rely on third party pre-built images, here's a little project that allows building your own GitLab image for Raspberry Pi 4, that is using official GitLab Dockerfile and debian package for RPI: https://github.com/xaxa06/gitlab-rpi-docker

0

Here a 2024 answer:

Currently, GitLab has not yet released an official Docker image for ARM, so you’ll still need to rely on third-party solutions. I have a Raspberry Pi 5 where I also wanted to host GitLab (CE), and I found this repository:
https://github.com/feskol/gitlab-arm64

So instead of using:

image: gitlab/gitlab-ce:17.6.1-ce.0

You need to use:

image: feskol/gitlab:17.6.1-ce

Note:
This Docker image is only for arm64. I'm using the Raspberry Pi OS (arm 64-Bit) and it's working fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.