rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vongosl...@apache.org
Subject [rocketmq-docker] 48/50: fix(dockerfile): use archive server to download rocketmq binary package
Date Tue, 03 Dec 2019 13:51:11 GMT
This is an automated email from the ASF dual-hosted git repository.

vongosling pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-docker.git

commit 2156b2bf8bac26386f28bfc108c4d2ec0d6d16e4
Author: ShannonDing <libya_003@163.com>
AuthorDate: Tue Dec 3 20:37:16 2019 +0800

    fix(dockerfile): use archive server to download rocketmq binary package
---
 README.md                     | 2 +-
 image-build/Dockerfile-alpine | 4 ++--
 image-build/Dockerfile-centos | 4 ++--
 image-build/build-image.sh    | 2 +-
 image-build/update.sh         | 5 +++--
 stage.sh                      | 2 +-
 6 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md
index b8cc5a7..e6b242d 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ cd image-build
 sh build-image.sh RMQ-VERSION BASE-IMAGE
 ```
 
-> Tip: The supported RMQ-VERSIONs can be obtained from [here](https://dist.apache.org/repos/dist/release/rocketmq/).
The supported BASE-IMAGEs are [centos, alpine]. For example: ```sh build-image.sh 4.5.0 alpine```
+> Tip: The supported RMQ-VERSIONs can be obtained from [here](https://archive.apache.org/dist/rocketmq/).
The supported BASE-IMAGEs are [centos, alpine]. For example: ```sh build-image.sh 4.5.0 alpine```
 
 ### B. Stage a specific version
 
diff --git a/image-build/Dockerfile-alpine b/image-build/Dockerfile-alpine
index 5ad8c0c..2876f5c 100644
--- a/image-build/Dockerfile-alpine
+++ b/image-build/Dockerfile-alpine
@@ -43,8 +43,8 @@ WORKDIR  ${ROCKETMQ_HOME}
 # Install
 RUN set -eux; \
     apk add --virtual .build-deps curl gnupg unzip; \
-    curl https://dist.apache.org/repos/dist/release/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip
-o rocketmq.zip; \
-    curl https://dist.apache.org/repos/dist/release/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip.asc
-o rocketmq.zip.asc; \
+    curl https://archive.apache.org/dist/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip
-o rocketmq.zip; \
+    curl https://archive.apache.org/dist/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip.asc
-o rocketmq.zip.asc; \
     #https://www.apache.org/dist/rocketmq/KEYS
 	curl https://www.apache.org/dist/rocketmq/KEYS -o KEYS; \
 	\
diff --git a/image-build/Dockerfile-centos b/image-build/Dockerfile-centos
index b810dc6..b26cc0d 100644
--- a/image-build/Dockerfile-centos
+++ b/image-build/Dockerfile-centos
@@ -47,8 +47,8 @@ ENV ROCKETMQ_HOME  /home/rocketmq/rocketmq-${ROCKETMQ_VERSION}
 WORKDIR  ${ROCKETMQ_HOME}
 
 RUN set -eux; \
-    curl https://dist.apache.org/repos/dist/release/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip
-o rocketmq.zip; \
-    curl https://dist.apache.org/repos/dist/release/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip.asc
-o rocketmq.zip.asc; \
+    curl https://archive.apache.org/dist/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip
-o rocketmq.zip; \
+    curl https://archive.apache.org/dist/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip.asc
-o rocketmq.zip.asc; \
     #https://www.apache.org/dist/rocketmq/KEYS
 	curl https://www.apache.org/dist/rocketmq/KEYS -o KEYS; \
 	\
diff --git a/image-build/build-image.sh b/image-build/build-image.sh
index 2f8657c..6073271 100755
--- a/image-build/build-image.sh
+++ b/image-build/build-image.sh
@@ -23,7 +23,7 @@ checkVersion()
         return 1
     fi
 
-	echo "Version $1 illegal, it should be X.X.X format(e.g. 4.5.0), please check released versions
in 'https://dist.apache.org/repos/dist/release/rocketmq/'"
+	echo "Version $1 illegal, it should be X.X.X format(e.g. 4.5.0), please check released versions
in 'https://archive.apache.org/dist/rocketmq/'"
     exit -1
 }
 
diff --git a/image-build/update.sh b/image-build/update.sh
index 21fde5c..3982797 100755
--- a/image-build/update.sh
+++ b/image-build/update.sh
@@ -23,14 +23,15 @@ checkVersion()
         return 0
     fi
 
-	echo "Version $1 illegal, it should be X.X.X format(e.g. 4.5.0), please check released versions
in 'https://dist.apache.org/repos/dist/release/rocketmq/'"
+	echo "Version $1 illegal, it should be X.X.X format(e.g. 4.5.0), please check released versions
in 'https://archive.apache.org/dist/rocketmq/'"
     exit -1
 }
 
 set -eu;
 
 # Update the image of the latest released version
-LATEST_VERSION=$(curl -s https://dist.apache.org/repos/dist/release/rocketmq/ | grep -B1
"KEYS" | grep -v "KEYS" | awk -F '>' '{print $3}' | awk -F '/' '{print $1}')
+# LATEST_VERSION=$(curl -s https://archive.apache.org/dist/rocketmq/ | grep -B1 "KEYS" |
grep -v "KEYS" | awk -F '>' '{print $3}' | awk -F '/' '{print $1}')
+LATEST_VERSION=$(curl -s https://archive.apache.org/dist/rocketmq/ | grep -B8 "KEYS" | grep
-v "KEY" | grep -v "rocketmq" | tail -1 | awk -F '>' '{print $3}' | awk -F '/' '{print
$1}')
 
 checkVersion ${LATEST_VERSION}
 
diff --git a/stage.sh b/stage.sh
index cb7898f..3e57ca2 100644
--- a/stage.sh
+++ b/stage.sh
@@ -23,7 +23,7 @@ checkVersion()
         return 1
     fi
             
-	echo "Version $1 illegal, it should be X.X.X format(e.g. 4.5.0), please check released versions
in 'https://dist.apache.org/repos/dist/release/rocketmq/'"
+	echo "Version $1 illegal, it should be X.X.X format(e.g. 4.5.0), please check released versions
in 'https://archive.apache.org/dist/rocketmq/'"
     return 0
 } 
 


Mime
View raw message