不废话。直接上干货
操作系统信息
############## Kylin Linux Version #################
Release:
Kylin Linux Advanced Server release V10 (Sword)
Kernel:
4.19.90-24.4.v2101.ky10.aarch64
Build:
Kylin Linux Advanced Server
release V10 (SP2) /(Sword)-aarch64-Build09/20210524
#################################################
前置条件
docker 正常安装
正确执行内容
docker run \
--detach \
--restart always \
--name gitlab-ce \
--privileged \
--memory 4096M \
--publish 8222:22 \
--publish 8099:80 \
--publish 8443:443 \
--hostname 10.9.98.89 \
--env GITLAB_OMNIBUS_CONFIG=" \
nginx['redirect_http_to_https'] = true; "\
--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
常见问题处理
运行gitlab 提示格式错误
docker run --publish 8443:443 --publish 8099:80 --publish 8222:22 --name gitlab --restart unless-stopped --volume /d/docker/gitlab/etc:/etc/gitlab --volume /d/docker/gitlab/log:/var/log/gitlab --volume /d/docker/gitlab/data:/var/opt/gitlab --privileged=true beginor/gitlab-ce
standard_init_linux.go:220: exec user process caused exec format error
libcontainer: container start initialization failed: standard_init_linux.go:220: exec user process caused exec format error[
原因可能为arm 使用了x86的镜像
docker run --publish 8443:443 --publish 8099:8099 --publish 8222:22 --name gitlab --restart unless-stopped --volume /d/docker/gitlab/etc:/etc/gitlab --volume /d/docker/gitlab/log:/var/log/gitlab --volume /d/docker/gitlab/data:/var/opt/gitlab --privileged=true yrzr/gitlab-ce-arm64v8:latest
需要注意内容:
需要在配置文件中 把host 内容改成需要绑定可以访问的内网地址
gitlab/data/gitlab-rails/etc
gitlab/etc
同样 exterrnal_url也需要调整