极狐GitLab 正式推出面向 GitLab 老旧版本(12.x、13.x、14.x、15.x 等)免费用户的专业升级服务,点击查看详情

12下一页
返回列表 发布新帖

求arm64v8 docker版本gitlab镜像

1230 11
发表于 2024-4-18 17:15:15 来自手机 | 显示全部楼层 阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
请教一下各位大佬,有arm64v8  docker版本gitlab镜像嘛,若有分享下compose 感谢哈
回复

使用道具 举报

评论11

ALEXLv.2 发表于 2024-4-18 21:32:23 | 显示全部楼层
抱歉,目前只有 omnibus 的arm64安装包: https://packages.gitlab.cn/#brow ... m=group.raw%3Darm64
回复

使用道具 举报

ing楼主Lv.1 发表于 2024-4-24 21:04:59 来自手机 | 显示全部楼层
大佬  还想请教下  我的是个嵌入式平台所以ram只有2g这个可以运行嘛  是不是需要配置一些参数  禁用一些功能就可以了呢
回复

使用道具 举报

ing楼主Lv.1 发表于 2024-4-24 21:05:45 来自手机 | 显示全部楼层
ALEX 发表于 2024-4-18 21:32
抱歉,目前只有 omnibus 的arm64安装包: https://packages.gitlab.cn/#browse/search/custom=group.raw%3Da ...

大佬  还想请教下  我的是个嵌入式平台所以ram只有2g   这个可以运行嘛  是不是需要配置一些参数  禁用一些功能就可以了呢  先谢谢啦
回复

使用道具 举报

ffliLv.7 发表于 2024-4-25 09:35:54 | 显示全部楼层
ing 发表于 2024-4-24 21:05
大佬  还想请教下  我的是个嵌入式平台所以ram只有2g   这个可以运行嘛  是不是需要配置一些参数  禁用一 ...

需要关闭一些不必要的组件,具体参考:https://docs.gitlab.cn/omnibus/s ... nstrained_envs.html
回复

使用道具 举报

小马哥Lv.8 发表于 2024-4-25 12:36:12 | 显示全部楼层
ing 发表于 2024-4-24 21:04
大佬  还想请教下  我的是个嵌入式平台所以ram只有2g这个可以运行嘛  是不是需要配置一些参数  禁用一些功 ...

2g 有点小,最好还是大一些,因为随着使用的长久,认输的增加,ram 肯定会使用更多。
开心交流,交流开心。
回复

使用道具 举报

永胜Lv.1 发表于 2024-4-29 09:52:10 | 显示全部楼层

可以参考官方的镜像自己制作,制作准备两个文件

Dockerfile

FROM alpine as omnibus-gitlab

ARG VERSION=15.11.10

#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN apk update && apk add --update --no-cache curl git wget

RUN git clone -b ${VERSION}+ce.0 https://gitlab.com/gitlab-org/omnibus-gitlab.git /omnibus-gitlab

FROM ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive

SHELL ["/bin/bash", "-c"]

# Install required packages
RUN apt-get update -q \
    && apt-get install -yq --no-install-recommends \
      apt-transport-https\
      curl\
      xz-utils\
      git \
      busybox \
      ca-certificates \
      openssh-server \
      tzdata \
      wget \
      perl \
      libperl5.34 \
      libatomic1 \
      bash \
    && rm -rf /var/lib/apt/lists/*

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get install -y --no-install-recommends tzdata && \
    dpkg-reconfigure --frontend noninteractive tzdata

# Default to supporting utf-8
ENV LANG=en_US.UTF-8

# Use BusyBox
ENV EDITOR /bin/vi
RUN busybox --install \
    && { \
        echo '#!/bin/sh'; \
        echo '/bin/vi "$@"'; \
    } > /usr/local/bin/busybox-editor \
    && chmod +x /usr/local/bin/busybox-editor \
    && update-alternatives --install /usr/bin/editor editor /usr/local/bin/busybox-editor 1

# Remove MOTD
RUN rm -rf /etc/update-motd.d /etc/motd /etc/motd.dynamic
RUN ln -fs /dev/null /run/motd.dynamic

# Legacy code to be removed on 17.0.  See: https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7035
ENV GITLAB_ALLOW_SHA1_RSA=false

ARG VERSION=15.11.10

RUN set -eux \
    ; OS="$(uname | tr '[:upper:]' '[:lower:]')" \
    ; ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" \
    ; echo "DOWNLOAD_URL=https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/jammy/gitlab-ce_${VERSION}-ce.0_${ARCH}.deb/download.deb" > /RELEASE

COPY --from=omnibus-gitlab /omnibus-gitlab/docker/assets/ /assets/
# as gitlab-ci checks out with mode 666 we need to set permissions of the files we copied into the
# container to a secure value. Issue #5956
RUN chmod -R og-w /assets RELEASE ; \
  /assets/setup

# Allow to access embedded tools
ENV PATH /opt/gitlab/embedded/bin:/opt/gitlab/bin:/assets:$PATH

# Resolve error: TERM environment variable not set.
ENV TERM xterm

# Expose web & ssh
EXPOSE 443 80 22

# Define data volumes
VOLUME ["/etc/gitlab", "/var/opt/gitlab", "/var/log/gitlab"]

# Wrapper to handle signal, trigger runit and reconfigure GitLab
CMD ["/assets/wrapper"]

HEALTHCHECK --interval=60s --timeout=30s --retries=5 \
CMD /opt/gitlab/bin/gitlab-healthcheck --fail --max-time 10

由于跨平台构建采用buildx bake,所以需要准备一个bake配置文件,如下:

docker-bake.hcl

variable "VERSION" {
  default = "16.7.2"
}

variable "FIXID" {
  default = "1"
}

group "default" {
  targets = ["gitlab-ce"]
}

target "gitlab-ce" {
    labels = {
        "cloud.opsbox.author" = "seanly"
        "cloud.opsbox.image.name" = "gitlab-ce"
        "cloud.opsbox.image.version" = "${VERSION}"
        "cloud.opsbox.image.fixid" = "${FIXID}"
    }
    dockerfile = "Dockerfile"
    context  = "./"
    args = {
        VERSION="${VERSION}"
    }
    platforms = ["linux/amd64", "linux/arm64"]
    tags = ["seanly/appset:gitlab-ce-${VERSION}-${FIXID}"]
    output = ["type=image,push=true"]
}

只需要执行

docker buildx bake -f docker-bake.hcl

下面是通过docker-compose的方式运行,也是需要准备编排文件

docker-compose.yml

version: '3'
services:
  gitlab-ce:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        - VERSION=16.7.2
    container_name: gitlab-ce
    restart: always
    image: seanly/appset:gitlab-ce-16.7.2
    ports:
    - "30022:22"
    - "8080:80"
    environment:
      TZ: 'Asia/Shanghai'
    volumes:
    - ./config:/etc/gitlab
    - gitlab-data:/var/opt/gitlab

volumes:
    gitlab-data:

networks:
  default:
    name: opsbox-network
    external: true

构建跨平台镜像可以通过buildkit制作

seanly/appset:gitlab-ce-16.7.2 这个是制作好的,

回复

使用道具 举报

永胜Lv.1 发表于 2024-4-29 09:52:10 | 显示全部楼层

可以参考官方的镜像自己制作,制作准备两个文件

Dockerfile

FROM alpine as omnibus-gitlab

ARG VERSION=15.11.10

#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN apk update && apk add --update --no-cache curl git wget

RUN git clone -b ${VERSION}+ce.0 https://gitlab.com/gitlab-org/omnibus-gitlab.git /omnibus-gitlab

FROM ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive

SHELL ["/bin/bash", "-c"]

# Install required packages
RUN apt-get update -q \
    && apt-get install -yq --no-install-recommends \
      apt-transport-https\
      curl\
      xz-utils\
      git \
      busybox \
      ca-certificates \
      openssh-server \
      tzdata \
      wget \
      perl \
      libperl5.34 \
      libatomic1 \
      bash \
    && rm -rf /var/lib/apt/lists/*

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get install -y --no-install-recommends tzdata && \
    dpkg-reconfigure --frontend noninteractive tzdata

# Default to supporting utf-8
ENV LANG=en_US.UTF-8

# Use BusyBox
ENV EDITOR /bin/vi
RUN busybox --install \
    && { \
        echo '#!/bin/sh'; \
        echo '/bin/vi "$@"'; \
    } > /usr/local/bin/busybox-editor \
    && chmod +x /usr/local/bin/busybox-editor \
    && update-alternatives --install /usr/bin/editor editor /usr/local/bin/busybox-editor 1

# Remove MOTD
RUN rm -rf /etc/update-motd.d /etc/motd /etc/motd.dynamic
RUN ln -fs /dev/null /run/motd.dynamic

# Legacy code to be removed on 17.0.  See: https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7035
ENV GITLAB_ALLOW_SHA1_RSA=false

ARG VERSION=15.11.10

RUN set -eux \
    ; OS="$(uname | tr '[:upper:]' '[:lower:]')" \
    ; ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" \
    ; echo "DOWNLOAD_URL=https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/jammy/gitlab-ce_${VERSION}-ce.0_${ARCH}.deb/download.deb" > /RELEASE

COPY --from=omnibus-gitlab /omnibus-gitlab/docker/assets/ /assets/
# as gitlab-ci checks out with mode 666 we need to set permissions of the files we copied into the
# container to a secure value. Issue #5956
RUN chmod -R og-w /assets RELEASE ; \
  /assets/setup

# Allow to access embedded tools
ENV PATH /opt/gitlab/embedded/bin:/opt/gitlab/bin:/assets:$PATH

# Resolve error: TERM environment variable not set.
ENV TERM xterm

# Expose web & ssh
EXPOSE 443 80 22

# Define data volumes
VOLUME ["/etc/gitlab", "/var/opt/gitlab", "/var/log/gitlab"]

# Wrapper to handle signal, trigger runit and reconfigure GitLab
CMD ["/assets/wrapper"]

HEALTHCHECK --interval=60s --timeout=30s --retries=5 \
CMD /opt/gitlab/bin/gitlab-healthcheck --fail --max-time 10

由于跨平台构建采用buildx bake,所以需要准备一个bake配置文件,如下:

docker-bake.hcl

variable "VERSION" {
  default = "16.7.2"
}

variable "FIXID" {
  default = "1"
}

group "default" {
  targets = ["gitlab-ce"]
}

target "gitlab-ce" {
    labels = {
        "cloud.opsbox.author" = "seanly"
        "cloud.opsbox.image.name" = "gitlab-ce"
        "cloud.opsbox.image.version" = "${VERSION}"
        "cloud.opsbox.image.fixid" = "${FIXID}"
    }
    dockerfile = "Dockerfile"
    context  = "./"
    args = {
        VERSION="${VERSION}"
    }
    platforms = ["linux/amd64", "linux/arm64"]
    tags = ["seanly/appset:gitlab-ce-${VERSION}-${FIXID}"]
    output = ["type=image,push=true"]
}

只需要执行

docker buildx bake -f docker-bake.hcl

下面是通过docker-compose的方式运行,也是需要准备编排文件

docker-compose.yml

version: '3'
services:
  gitlab-ce:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        - VERSION=16.7.2
    container_name: gitlab-ce
    restart: always
    image: seanly/appset:gitlab-ce-16.7.2
    ports:
    - "30022:22"
    - "8080:80"
    environment:
      TZ: 'Asia/Shanghai'
    volumes:
    - ./config:/etc/gitlab
    - gitlab-data:/var/opt/gitlab

volumes:
    gitlab-data:

networks:
  default:
    name: opsbox-network
    external: true

构建跨平台镜像可以通过buildkit制作

seanly/appset:gitlab-ce-16.7.2 这个是制作好的,

回复

使用道具 举报

永胜Lv.1 发表于 2024-4-29 09:52:10 | 显示全部楼层

可以参考官方的镜像自己制作,制作准备两个文件

Dockerfile

FROM alpine as omnibus-gitlab

ARG VERSION=15.11.10

#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN apk update && apk add --update --no-cache curl git wget

RUN git clone -b ${VERSION}+ce.0 https://gitlab.com/gitlab-org/omnibus-gitlab.git /omnibus-gitlab

FROM ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive

SHELL ["/bin/bash", "-c"]

# Install required packages
RUN apt-get update -q \
    && apt-get install -yq --no-install-recommends \
      apt-transport-https\
      curl\
      xz-utils\
      git \
      busybox \
      ca-certificates \
      openssh-server \
      tzdata \
      wget \
      perl \
      libperl5.34 \
      libatomic1 \
      bash \
    && rm -rf /var/lib/apt/lists/*

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get install -y --no-install-recommends tzdata && \
    dpkg-reconfigure --frontend noninteractive tzdata

# Default to supporting utf-8
ENV LANG=en_US.UTF-8

# Use BusyBox
ENV EDITOR /bin/vi
RUN busybox --install \
    && { \
        echo '#!/bin/sh'; \
        echo '/bin/vi "$@"'; \
    } > /usr/local/bin/busybox-editor \
    && chmod +x /usr/local/bin/busybox-editor \
    && update-alternatives --install /usr/bin/editor editor /usr/local/bin/busybox-editor 1

# Remove MOTD
RUN rm -rf /etc/update-motd.d /etc/motd /etc/motd.dynamic
RUN ln -fs /dev/null /run/motd.dynamic

# Legacy code to be removed on 17.0.  See: https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7035
ENV GITLAB_ALLOW_SHA1_RSA=false

ARG VERSION=15.11.10

RUN set -eux \
    ; OS="$(uname | tr '[:upper:]' '[:lower:]')" \
    ; ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" \
    ; echo "DOWNLOAD_URL=https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/jammy/gitlab-ce_${VERSION}-ce.0_${ARCH}.deb/download.deb" > /RELEASE

COPY --from=omnibus-gitlab /omnibus-gitlab/docker/assets/ /assets/
# as gitlab-ci checks out with mode 666 we need to set permissions of the files we copied into the
# container to a secure value. Issue #5956
RUN chmod -R og-w /assets RELEASE ; \
  /assets/setup

# Allow to access embedded tools
ENV PATH /opt/gitlab/embedded/bin:/opt/gitlab/bin:/assets:$PATH

# Resolve error: TERM environment variable not set.
ENV TERM xterm

# Expose web & ssh
EXPOSE 443 80 22

# Define data volumes
VOLUME ["/etc/gitlab", "/var/opt/gitlab", "/var/log/gitlab"]

# Wrapper to handle signal, trigger runit and reconfigure GitLab
CMD ["/assets/wrapper"]

HEALTHCHECK --interval=60s --timeout=30s --retries=5 \
CMD /opt/gitlab/bin/gitlab-healthcheck --fail --max-time 10

由于跨平台构建采用buildx bake,所以需要准备一个bake配置文件,如下:

docker-bake.hcl

variable "VERSION" {
  default = "16.7.2"
}

variable "FIXID" {
  default = "1"
}

group "default" {
  targets = ["gitlab-ce"]
}

target "gitlab-ce" {
    labels = {
        "cloud.opsbox.author" = "seanly"
        "cloud.opsbox.image.name" = "gitlab-ce"
        "cloud.opsbox.image.version" = "${VERSION}"
        "cloud.opsbox.image.fixid" = "${FIXID}"
    }
    dockerfile = "Dockerfile"
    context  = "./"
    args = {
        VERSION="${VERSION}"
    }
    platforms = ["linux/amd64", "linux/arm64"]
    tags = ["seanly/appset:gitlab-ce-${VERSION}-${FIXID}"]
    output = ["type=image,push=true"]
}

只需要执行

docker buildx bake -f docker-bake.hcl

下面是通过docker-compose的方式运行,也是需要准备编排文件

docker-compose.yml

version: '3'
services:
  gitlab-ce:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        - VERSION=16.7.2
    container_name: gitlab-ce
    restart: always
    image: seanly/appset:gitlab-ce-16.7.2
    ports:
    - "30022:22"
    - "8080:80"
    environment:
      TZ: 'Asia/Shanghai'
    volumes:
    - ./config:/etc/gitlab
    - gitlab-data:/var/opt/gitlab

volumes:
    gitlab-data:

networks:
  default:
    name: opsbox-network
    external: true

构建跨平台镜像可以通过buildkit制作

seanly/appset:gitlab-ce-16.7.2 这个是制作好的,

回复

使用道具 举报

永胜Lv.1 发表于 2024-4-29 09:52:10 | 显示全部楼层

可以参考官方的镜像自己制作,制作准备两个文件

Dockerfile

FROM alpine as omnibus-gitlab

ARG VERSION=15.11.10

#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN apk update && apk add --update --no-cache curl git wget

RUN git clone -b ${VERSION}+ce.0 https://gitlab.com/gitlab-org/omnibus-gitlab.git /omnibus-gitlab

FROM ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive

SHELL ["/bin/bash", "-c"]

# Install required packages
RUN apt-get update -q \
    && apt-get install -yq --no-install-recommends \
      apt-transport-https\
      curl\
      xz-utils\
      git \
      busybox \
      ca-certificates \
      openssh-server \
      tzdata \
      wget \
      perl \
      libperl5.34 \
      libatomic1 \
      bash \
    && rm -rf /var/lib/apt/lists/*

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get install -y --no-install-recommends tzdata && \
    dpkg-reconfigure --frontend noninteractive tzdata

# Default to supporting utf-8
ENV LANG=en_US.UTF-8

# Use BusyBox
ENV EDITOR /bin/vi
RUN busybox --install \
    && { \
        echo '#!/bin/sh'; \
        echo '/bin/vi "$@"'; \
    } > /usr/local/bin/busybox-editor \
    && chmod +x /usr/local/bin/busybox-editor \
    && update-alternatives --install /usr/bin/editor editor /usr/local/bin/busybox-editor 1

# Remove MOTD
RUN rm -rf /etc/update-motd.d /etc/motd /etc/motd.dynamic
RUN ln -fs /dev/null /run/motd.dynamic

# Legacy code to be removed on 17.0.  See: https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7035
ENV GITLAB_ALLOW_SHA1_RSA=false

ARG VERSION=15.11.10

RUN set -eux \
    ; OS="$(uname | tr '[:upper:]' '[:lower:]')" \
    ; ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" \
    ; echo "DOWNLOAD_URL=https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/jammy/gitlab-ce_${VERSION}-ce.0_${ARCH}.deb/download.deb" > /RELEASE

COPY --from=omnibus-gitlab /omnibus-gitlab/docker/assets/ /assets/
# as gitlab-ci checks out with mode 666 we need to set permissions of the files we copied into the
# container to a secure value. Issue #5956
RUN chmod -R og-w /assets RELEASE ; \
  /assets/setup

# Allow to access embedded tools
ENV PATH /opt/gitlab/embedded/bin:/opt/gitlab/bin:/assets:$PATH

# Resolve error: TERM environment variable not set.
ENV TERM xterm

# Expose web & ssh
EXPOSE 443 80 22

# Define data volumes
VOLUME ["/etc/gitlab", "/var/opt/gitlab", "/var/log/gitlab"]

# Wrapper to handle signal, trigger runit and reconfigure GitLab
CMD ["/assets/wrapper"]

HEALTHCHECK --interval=60s --timeout=30s --retries=5 \
CMD /opt/gitlab/bin/gitlab-healthcheck --fail --max-time 10

由于跨平台构建采用buildx bake,所以需要准备一个bake配置文件,如下:

docker-bake.hcl

variable "VERSION" {
  default = "16.7.2"
}

variable "FIXID" {
  default = "1"
}

group "default" {
  targets = ["gitlab-ce"]
}

target "gitlab-ce" {
    labels = {
        "cloud.opsbox.author" = "seanly"
        "cloud.opsbox.image.name" = "gitlab-ce"
        "cloud.opsbox.image.version" = "${VERSION}"
        "cloud.opsbox.image.fixid" = "${FIXID}"
    }
    dockerfile = "Dockerfile"
    context  = "./"
    args = {
        VERSION="${VERSION}"
    }
    platforms = ["linux/amd64", "linux/arm64"]
    tags = ["seanly/appset:gitlab-ce-${VERSION}-${FIXID}"]
    output = ["type=image,push=true"]
}

只需要执行

docker buildx bake -f docker-bake.hcl

下面是通过docker-compose的方式运行,也是需要准备编排文件

docker-compose.yml

version: '3'
services:
  gitlab-ce:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        - VERSION=16.7.2
    container_name: gitlab-ce
    restart: always
    image: seanly/appset:gitlab-ce-16.7.2
    ports:
    - "30022:22"
    - "8080:80"
    environment:
      TZ: 'Asia/Shanghai'
    volumes:
    - ./config:/etc/gitlab
    - gitlab-data:/var/opt/gitlab

volumes:
    gitlab-data:

networks:
  default:
    name: opsbox-network
    external: true

构建跨平台镜像可以通过buildkit制作

seanly/appset:gitlab-ce-16.7.2 这个是制作好的,

回复

使用道具 举报

意见建议

Email:forum@gitlab.cn
  • 关注公众号
  • 添加专业顾问
Copyright © 2001-2024 极狐GitLab论坛 版权所有 All Rights Reserved. 鄂ICP备2021008419号-1|鄂公网安备42018502006137号
关灯 快速发帖
扫一扫添加专业顾问
返回顶部
快速回复 返回顶部 返回列表