From b75b89b8fd8a8f49ba0c9d5cadd811c515a48d90 Mon Sep 17 00:00:00 2001 From: GuangJie1 Date: Wed, 20 Aug 2025 09:55:49 +0800 Subject: [PATCH] upgrade oceanbase --- .../4.3.5_CE_BP3/24.03-lts-sp2/Dockerfile | 20 +++++++++++++++ .../4.3.5_CE_BP3/24.03-lts-sp2/download.sh | 25 +++++++++++++++++++ Database/oceanbase/README.md | 8 +++--- Database/oceanbase/doc/image-info.yml | 7 +++--- Database/oceanbase/meta.yml | 4 ++- 5 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 Database/oceanbase/4.3.5_CE_BP3/24.03-lts-sp2/Dockerfile create mode 100644 Database/oceanbase/4.3.5_CE_BP3/24.03-lts-sp2/download.sh diff --git a/Database/oceanbase/4.3.5_CE_BP3/24.03-lts-sp2/Dockerfile b/Database/oceanbase/4.3.5_CE_BP3/24.03-lts-sp2/Dockerfile new file mode 100644 index 00000000..421ca143 --- /dev/null +++ b/Database/oceanbase/4.3.5_CE_BP3/24.03-lts-sp2/Dockerfile @@ -0,0 +1,20 @@ +ARG BASE=openeuler/openeuler:24.03-lts-sp2 +FROM $BASE + +ARG VERSION=4.3.5_CE_BP3 +ARG TARGETARCH +ARG OCEANBASE=/opt/oceanbase.tar.gz + +COPY download.sh / +RUN yum install -y findutils && \ + ln -s /usr/bin/python3 /usr/bin/python && \ + yum clean all && \ + sh /download.sh ${VERSION/CE_/} ${TARGETARCH} ${OCEANBASE} && \ + mkdir -p /opt/oceanbase/ && \ + tar -zxf $OCEANBASE -C /opt/oceanbase/ --strip-components=1 && \ + cd /opt/oceanbase/bin && \ + sh install.sh && \ + source ~/.oceanbase-all-in-one/bin/env.sh && \ + rm -rf ${OCEANBASE} /opt/oceanbase + +CMD ["obd", "--version"] \ No newline at end of file diff --git a/Database/oceanbase/4.3.5_CE_BP3/24.03-lts-sp2/download.sh b/Database/oceanbase/4.3.5_CE_BP3/24.03-lts-sp2/download.sh new file mode 100644 index 00000000..77f5ea5a --- /dev/null +++ b/Database/oceanbase/4.3.5_CE_BP3/24.03-lts-sp2/download.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +#VERSION="4.3.5_bp2_hf1" +VERSION=${1,,} +TARGETARCH=$2 +OUTPUTDIR=$3 +ARCH="" +if [ "$TARGETARCH" = "amd64" ]; then + ARCH="x86_64"; +elif [ "$TARGETARCH" = "arm64" ]; then + ARCH="aarch64"; +fi; +BASE_URL="https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/download-center/opensource/oceanbase-all-in-one/8/${ARCH}" +for day in {0..60}; do + DATE=$(date -d "today - $day days" +"%Y%m%d") + URL="${BASE_URL}/oceanbase-all-in-one-${VERSION}_${DATE}.el8.${ARCH}.tar.gz" + if curl --output /dev/null --silent --head --fail "$URL"; then + echo "[INFO] 正在下载文件: ${URL}" + curl -fSL -o $OUTPUTDIR ${URL} + exit 0 + fi +done +echo "[ERROR] 无法获取下载链接,请手动检查!" >&2 +exit 1 \ No newline at end of file diff --git a/Database/oceanbase/README.md b/Database/oceanbase/README.md index 585b65a1..ad45c9c2 100644 --- a/Database/oceanbase/README.md +++ b/Database/oceanbase/README.md @@ -15,9 +15,11 @@ Learn more on [oceanbase website](https://www.oceanbase.com/). # Supported tags and respective Dockerfile links The tag of each oceanbase docker image is consist of the version of oceanbase and the version of basic image. The details are as follows -| Tags | Currently | Architectures| -|------|-----------|---------------| -|[4.3.5_CE_BP2_HF1-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Database/oceanbase/4.3.5_CE_BP2_HF1/24.03-lts-sp1/Dockerfile)| oceanbase 4.3.5_CE_BP2_HF1 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +| Tags | Currently | Architectures | +|------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------|---------------| +| [4.3.5_CE_BP2_HF1-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Database/oceanbase/4.3.5_CE_BP2_HF1/24.03-lts-sp1/Dockerfile) | oceanbase 4.3.5_CE_BP2_HF1 on openEuler 24.03-LTS-SP1 | amd64, arm64 | +| [4.3.5_CE_BP3-oe2403sp2](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Database/oceanbase/4.3.5_CE_BP3/24.03-lts-sp2/Dockerfile) | oceanbase 4.3.5_CE_BP3 on openEuler 24.03-LTS-SP2 | amd64, arm64 | # Usage Here, users can select `{Tag}` based on their requirements. diff --git a/Database/oceanbase/doc/image-info.yml b/Database/oceanbase/doc/image-info.yml index bf085f75..fb9243e7 100644 --- a/Database/oceanbase/doc/image-info.yml +++ b/Database/oceanbase/doc/image-info.yml @@ -9,9 +9,10 @@ environment: | tags: | oceanbase镜像的Tag由其版本信息和基础镜像版本信息组成,详细内容如下 - | Tags | Currently | Architectures| - |------|-----------|---------------| - |[4.3.5_CE_BP2_HF1-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Database/oceanbase/4.3.5_CE_BP2_HF1/24.03-lts-sp1/Dockerfile)| oceanbase 4.3.5_CE_BP2_HF1 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + | Tags | Currently | Architectures | + |------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------|---------------| + | [4.3.5_CE_BP2_HF1-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Database/oceanbase/4.3.5_CE_BP2_HF1/24.03-lts-sp1/Dockerfile) | oceanbase 4.3.5_CE_BP2_HF1 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + | [4.3.5_CE_BP3-oe2403sp2](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Database/oceanbase/4.3.5_CE_BP3/24.03-lts-sp2/Dockerfile) | oceanbase 4.3.5_CE_BP3 on openEuler 24.03-LTS-SP2 | amd64, arm64 | download: | 拉取镜像到本地 diff --git a/Database/oceanbase/meta.yml b/Database/oceanbase/meta.yml index 2b0f8c60..0aff9473 100644 --- a/Database/oceanbase/meta.yml +++ b/Database/oceanbase/meta.yml @@ -1,2 +1,4 @@ 4.3.5_CE_BP2_HF1-oe2403sp1: - path: 4.3.5_CE_BP2_HF1/24.03-lts-sp1/Dockerfile \ No newline at end of file + path: 4.3.5_CE_BP2_HF1/24.03-lts-sp1/Dockerfile +4.3.5_CE_BP3-oe2403sp1: + path: 4.3.5_CE_BP3/24.03-lts-sp2/Dockerfile \ No newline at end of file -- Gitee