From c853faea3c71abdc94abf90d86fca93cac766fbd Mon Sep 17 00:00:00 2001 From: jiuker Date: Fri, 2 Dec 2022 17:21:14 +0800 Subject: [PATCH 1/4] patch-redis --- .github/workflows/release.yml | 4 ++-- arm64/images/ot-redis/Dockerfile | 4 ++++ arm64/images/ot-redis/Dockerfile-bash | 32 +++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 arm64/images/ot-redis/Dockerfile-bash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01203d67a..390239c2f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,12 +28,12 @@ jobs: uses: docker/build-push-action@v3.1.1 with: context: ./arm64/images/ot-redis - file: ./arm64/images/ot-redis/Dockerfile-release + file: ./arm64/images/ot-redis/Dockerfile-bash github-token: ${{ secrets.GITHUB_TOKEN }} push: true platforms: ${{ env.BUILD_PLATFORM }} tags: | - ${{ env.ONLINE_REGISTER }}/ot-redis:v6.2.5-alpine + ${{ env.ONLINE_REGISTER }}/ot-redis:v6.2.5-1 ${{ env.ONLINE_REGISTER }}/ot-redis:latest cache-from: type=gha cache-to: type=gha,mode=max diff --git a/arm64/images/ot-redis/Dockerfile b/arm64/images/ot-redis/Dockerfile index c22aadd4e..7f9818076 100644 --- a/arm64/images/ot-redis/Dockerfile +++ b/arm64/images/ot-redis/Dockerfile @@ -30,6 +30,10 @@ COPY healthcheck.sh /usr/bin/healthcheck.sh RUN mkdir -p /opt/redis/ && chmod -R g+rwX /etc/redis /opt/redis +RUN chmod +x /usr/bin/entrypoint.sh +RUN chmod +x /usr/bin/setupMasterSlave.sh +RUN chmod +x /usr/bin/healthcheck.sh + VOLUME ["/data"] WORKDIR /data diff --git a/arm64/images/ot-redis/Dockerfile-bash b/arm64/images/ot-redis/Dockerfile-bash new file mode 100644 index 000000000..b8fb61583 --- /dev/null +++ b/arm64/images/ot-redis/Dockerfile-bash @@ -0,0 +1,32 @@ +FROM --platform=$TARGETPLATFORM docker.m.daocloud.io/redis:6.2.5-alpine + + +#https://github.com/redis/redis/archive/refs/tags/6.2.5.tar.gz + +#RUN addgroup -S -g 1001 redis \ +# && adduser -S -G redis -u 1001 redis \ +# && apk add --no-cache su-exec tzdata make curl build-base linux-headers bash + +RUN apk add --no-cache su-exec tzdata make curl build-base linux-headers bash + +COPY redis.conf /etc/redis/redis.conf + +COPY entrypoint.sh /usr/bin/entrypoint.sh + +COPY setupMasterSlave.sh /usr/bin/setupMasterSlave.sh + +COPY healthcheck.sh /usr/bin/healthcheck.sh + +RUN mkdir -p /opt/redis/ && chmod -R g+rwX /etc/redis /opt/redis + +RUN chmod +x /usr/bin/entrypoint.sh +RUN chmod +x /usr/bin/setupMasterSlave.sh +RUN chmod +x /usr/bin/healthcheck.sh + +VOLUME ["/data"] + +WORKDIR /data + +EXPOSE 6379 6379 + +ENTRYPOINT ["/usr/bin/entrypoint.sh"] \ No newline at end of file From 2d2429a9ba8a7ba0532a1496608f7a577d6f49dc Mon Sep 17 00:00:00 2001 From: jiuker Date: Fri, 2 Dec 2022 17:23:35 +0800 Subject: [PATCH 2/4] patch-redis --- arm64/images/ot-redis/Dockerfile-bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arm64/images/ot-redis/Dockerfile-bash b/arm64/images/ot-redis/Dockerfile-bash index b8fb61583..d8f8c24a0 100644 --- a/arm64/images/ot-redis/Dockerfile-bash +++ b/arm64/images/ot-redis/Dockerfile-bash @@ -9,6 +9,8 @@ FROM --platform=$TARGETPLATFORM docker.m.daocloud.io/redis:6.2.5-alpine RUN apk add --no-cache su-exec tzdata make curl build-base linux-headers bash +RUN mkdir -p /etc/redis + COPY redis.conf /etc/redis/redis.conf COPY entrypoint.sh /usr/bin/entrypoint.sh From 9aa3ee66f9f3d27b8b70152ef294acd2eadceca3 Mon Sep 17 00:00:00 2001 From: jiuker Date: Fri, 2 Dec 2022 18:01:11 +0800 Subject: [PATCH 3/4] patch-redis --- .github/workflows/release.yml | 2 +- arm64/images/ot-redis/entrypoint.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 390239c2f..4fa0951bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: push: true platforms: ${{ env.BUILD_PLATFORM }} tags: | - ${{ env.ONLINE_REGISTER }}/ot-redis:v6.2.5-1 + ${{ env.ONLINE_REGISTER }}/ot-redis:v6.2.5-2 ${{ env.ONLINE_REGISTER }}/ot-redis:latest cache-from: type=gha cache-to: type=gha,mode=max diff --git a/arm64/images/ot-redis/entrypoint.sh b/arm64/images/ot-redis/entrypoint.sh index 1a76d90d9..e4688dafb 100644 --- a/arm64/images/ot-redis/entrypoint.sh +++ b/arm64/images/ot-redis/entrypoint.sh @@ -72,10 +72,10 @@ external_config() { start_redis() { if [[ "${SETUP_MODE}" == "cluster" ]]; then echo "Starting redis service in cluster mode....." - redis-server /etc/redis/redis.conf --cluster-announce-ip "${POD_IP}" + redis-server /etc/redis/redis.conf --cluster-announce-ip "${POD_IP}" "--ignore-warnings" "ARM64-COW-BUG" else echo "Starting redis service in standalone mode....." - redis-server /etc/redis/redis.conf + redis-server /etc/redis/redis.conf "--ignore-warnings" "ARM64-COW-BUG" fi } From 4b1c59d4ebf78c0d90bc0f929d39ba1ee4d92b2e Mon Sep 17 00:00:00 2001 From: jiuker Date: Fri, 2 Dec 2022 18:28:22 +0800 Subject: [PATCH 4/4] rebuild --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4fa0951bc..6bd1d9901 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: push: true platforms: ${{ env.BUILD_PLATFORM }} tags: | - ${{ env.ONLINE_REGISTER }}/ot-redis:v6.2.5-2 + ${{ env.ONLINE_REGISTER }}/ot-redis:v6.2.5-alpine ${{ env.ONLINE_REGISTER }}/ot-redis:latest cache-from: type=gha cache-to: type=gha,mode=max