gr "http://rubygems.org" | awk -F':' '{print $1}' | xargs sed -i 's|echo ''':sources: ["http://rubygems.org%22%5C%5D%27%5C'' >> ~/.gemrc|gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/%7Cg'
Signed-off-by: Lin Jiaxin ljx.joe@qq.com --- container/assist-result/Dockerfile | 2 +- container/auto-submit/Dockerfile | 2 +- container/extract-stats/Dockerfile | 2 +- container/fluentd-base/Dockerfile | 2 +- container/git-mirror/Dockerfile | 2 +- container/mail-robot/Dockerfile | 2 +- container/monitoring/Dockerfile | 2 +- container/scheduler-dev/Dockerfile | 2 +- container/scheduler/Dockerfile | 2 +- container/webhook/Dockerfile | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/container/assist-result/Dockerfile b/container/assist-result/Dockerfile index 60a2fbf..1a02f49 100644 --- a/container/assist-result/Dockerfile +++ b/container/assist-result/Dockerfile @@ -11,5 +11,5 @@ RUN sed -ri.origin 's|^https?://dl-cdn.alpinelinux.org|http://mirrors.huaweiclou 'g++' 'gcc' 'pcre' 'libevent' 'make' 'git' 'bash' 'grep' 'coreutils' 'curl' 'util-linux'
RUN umask 002 && \ - echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \ + gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install rest-client activesupport json yaml elasticsearch sinatra puma terminal-table diff --git a/container/auto-submit/Dockerfile b/container/auto-submit/Dockerfile index 5804642..2a64c61 100644 --- a/container/auto-submit/Dockerfile +++ b/container/auto-submit/Dockerfile @@ -11,7 +11,7 @@ RUN apk update && \ apk add --no-cache git && \ apk add ruby-dev make gcc g++ util-linux
-RUN echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc +RUN gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/
RUN umask 002 && \ gem install bunny json activesupport git rest-client io-console elasticsearch diff --git a/container/extract-stats/Dockerfile b/container/extract-stats/Dockerfile index 31f4ef0..3a8c8f3 100644 --- a/container/extract-stats/Dockerfile +++ b/container/extract-stats/Dockerfile @@ -9,7 +9,7 @@ RUN sed -ri.origin 's|^https?://dl-cdn.alpinelinux.org|http://mirrors.huaweiclou 'g++' 'gcc' 'pcre' 'libevent' 'make' 'git' 'cpio' 'bash' 'grep'
RUN umask 002 && \ - echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \ + gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install rest-client activesupport git json yaml elasticsearch
ENV RUNTIME_DIR /c/cci/extract diff --git a/container/fluentd-base/Dockerfile b/container/fluentd-base/Dockerfile index ef671c2..08bcd9c 100644 --- a/container/fluentd-base/Dockerfile +++ b/container/fluentd-base/Dockerfile @@ -13,7 +13,7 @@ RUN apk add --no-cache 'ruby-dev' \ 'g++' 'gcc' 'pcre' 'libevent' 'make' 'git' 'cpio' 'bash'
RUN umask 002 && \ - echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \ + gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install fluentd && \ gem install fluent-plugin-rabbitmq && \ gem install fluent-plugin-elasticsearch && \ diff --git a/container/git-mirror/Dockerfile b/container/git-mirror/Dockerfile index 8b2a50a..2eac95c 100644 --- a/container/git-mirror/Dockerfile +++ b/container/git-mirror/Dockerfile @@ -10,7 +10,7 @@ RUN adduser -u 1090 -D lkp RUN sed -ri.origin 's|^https?://dl-cdn.alpinelinux.org|http://mirrors.huaweicloud.com%7Cg' /etc/apk/repositories
RUN apk update && \ - echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \ + gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ apk upgrade && \ apk add --no-cache git && \ apk add ruby-dev make gcc g++ openssh diff --git a/container/mail-robot/Dockerfile b/container/mail-robot/Dockerfile index f0aebbd..4402543 100644 --- a/container/mail-robot/Dockerfile +++ b/container/mail-robot/Dockerfile @@ -11,5 +11,5 @@ RUN apt-get update && \ apt-get install -y git uuid-runtime ruby-listen ruby-json ruby-mail ruby-rest-client
-RUN echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \ +RUN gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install fileutils elasticsearch activesupport diff --git a/container/monitoring/Dockerfile b/container/monitoring/Dockerfile index 5ceaf4f..0a5dc22 100644 --- a/container/monitoring/Dockerfile +++ b/container/monitoring/Dockerfile @@ -8,7 +8,7 @@ RUN apk add --no-cache 'ruby-dev' \ 'g++' 'gcc' 'pcre' 'libevent' 'make' 'git' 'cpio' 'bash'
RUN umask 002 && \ - echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \ + gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install rest-client && \ gem install activesupport && \ gem install git && \ diff --git a/container/scheduler-dev/Dockerfile b/container/scheduler-dev/Dockerfile index e0c9b4a..3b68d4a 100644 --- a/container/scheduler-dev/Dockerfile +++ b/container/scheduler-dev/Dockerfile @@ -8,7 +8,7 @@ MAINTAINER chief taxcom@tom.com RUN sed -ri.origin 's|^https?://dl-cdn.alpinelinux.org|http://mirrors.huaweicloud.com%7Cg' /etc/apk/repositories
RUN umask 002 && \ - echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \ + gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install rest-client activesupport bigdecimal open3 && \ gem install git json yaml && \ gem install cucumber diff --git a/container/scheduler/Dockerfile b/container/scheduler/Dockerfile index edac026..0ad813c 100644 --- a/container/scheduler/Dockerfile +++ b/container/scheduler/Dockerfile @@ -11,7 +11,7 @@ RUN apk add --no-cache 'ruby-dev' \ 'g++' 'gcc' 'pcre' 'libevent' 'make' 'git' 'cpio' 'bash'
RUN umask 002 && \ - echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \ + gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install rest-client && \ gem install activesupport && \ gem install git && \ diff --git a/container/webhook/Dockerfile b/container/webhook/Dockerfile index 9299bb6..1d5ee7c 100644 --- a/container/webhook/Dockerfile +++ b/container/webhook/Dockerfile @@ -13,7 +13,7 @@ RUN apk update && \ apk add --no-cache git && \ apk add npm ruby-dev
-RUN echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc +RUN gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/
RUN npm install git-webhook-handler && \ gem install bunny
On Mon, Jan 25, 2021 at 07:09:51PM +0800, Lin Jiaxin wrote:
Reviewed-by: Wang Yong wangyong0117@qq.com
gr "http://rubygems.org" | awk -F':' '{print $1}' | xargs sed -i 's|echo ''':sources: ["http://rubygems.org%22%5C%5D%27%5C'' >> ~/.gemrc|gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/%7Cg'
Signed-off-by: Lin Jiaxin ljx.joe@qq.com
container/assist-result/Dockerfile | 2 +- container/auto-submit/Dockerfile | 2 +- container/extract-stats/Dockerfile | 2 +- container/fluentd-base/Dockerfile | 2 +- container/git-mirror/Dockerfile | 2 +- container/mail-robot/Dockerfile | 2 +- container/monitoring/Dockerfile | 2 +- container/scheduler-dev/Dockerfile | 2 +- container/scheduler/Dockerfile | 2 +- container/webhook/Dockerfile | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/container/assist-result/Dockerfile b/container/assist-result/Dockerfile index 60a2fbf..1a02f49 100644 --- a/container/assist-result/Dockerfile +++ b/container/assist-result/Dockerfile @@ -11,5 +11,5 @@ RUN sed -ri.origin 's|^https?://dl-cdn.alpinelinux.org|http://mirrors.huaweiclou 'g++' 'gcc' 'pcre' 'libevent' 'make' 'git' 'bash' 'grep' 'coreutils' 'curl' 'util-linux'
RUN umask 002 && \
- echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \
- gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install rest-client activesupport json yaml elasticsearch sinatra puma terminal-table
diff --git a/container/auto-submit/Dockerfile b/container/auto-submit/Dockerfile index 5804642..2a64c61 100644 --- a/container/auto-submit/Dockerfile +++ b/container/auto-submit/Dockerfile @@ -11,7 +11,7 @@ RUN apk update && \ apk add --no-cache git && \ apk add ruby-dev make gcc g++ util-linux
-RUN echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc +RUN gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/
RUN umask 002 && \ gem install bunny json activesupport git rest-client io-console elasticsearch diff --git a/container/extract-stats/Dockerfile b/container/extract-stats/Dockerfile index 31f4ef0..3a8c8f3 100644 --- a/container/extract-stats/Dockerfile +++ b/container/extract-stats/Dockerfile @@ -9,7 +9,7 @@ RUN sed -ri.origin 's|^https?://dl-cdn.alpinelinux.org|http://mirrors.huaweiclou 'g++' 'gcc' 'pcre' 'libevent' 'make' 'git' 'cpio' 'bash' 'grep'
RUN umask 002 && \
- echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \
- gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install rest-client activesupport git json yaml elasticsearch
ENV RUNTIME_DIR /c/cci/extract diff --git a/container/fluentd-base/Dockerfile b/container/fluentd-base/Dockerfile index ef671c2..08bcd9c 100644 --- a/container/fluentd-base/Dockerfile +++ b/container/fluentd-base/Dockerfile @@ -13,7 +13,7 @@ RUN apk add --no-cache 'ruby-dev' \ 'g++' 'gcc' 'pcre' 'libevent' 'make' 'git' 'cpio' 'bash'
RUN umask 002 && \
- echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \
- gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install fluentd && \ gem install fluent-plugin-rabbitmq && \ gem install fluent-plugin-elasticsearch && \
diff --git a/container/git-mirror/Dockerfile b/container/git-mirror/Dockerfile index 8b2a50a..2eac95c 100644 --- a/container/git-mirror/Dockerfile +++ b/container/git-mirror/Dockerfile @@ -10,7 +10,7 @@ RUN adduser -u 1090 -D lkp RUN sed -ri.origin 's|^https?://dl-cdn.alpinelinux.org|http://mirrors.huaweicloud.com%7Cg' /etc/apk/repositories
RUN apk update && \
- echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \
- gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ apk upgrade && \ apk add --no-cache git && \ apk add ruby-dev make gcc g++ openssh
diff --git a/container/mail-robot/Dockerfile b/container/mail-robot/Dockerfile index f0aebbd..4402543 100644 --- a/container/mail-robot/Dockerfile +++ b/container/mail-robot/Dockerfile @@ -11,5 +11,5 @@ RUN apt-get update && \ apt-get install -y git uuid-runtime ruby-listen ruby-json ruby-mail ruby-rest-client
-RUN echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \ +RUN gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install fileutils elasticsearch activesupport diff --git a/container/monitoring/Dockerfile b/container/monitoring/Dockerfile index 5ceaf4f..0a5dc22 100644 --- a/container/monitoring/Dockerfile +++ b/container/monitoring/Dockerfile @@ -8,7 +8,7 @@ RUN apk add --no-cache 'ruby-dev' \ 'g++' 'gcc' 'pcre' 'libevent' 'make' 'git' 'cpio' 'bash'
RUN umask 002 && \
- echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \
- gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install rest-client && \ gem install activesupport && \ gem install git && \
diff --git a/container/scheduler-dev/Dockerfile b/container/scheduler-dev/Dockerfile index e0c9b4a..3b68d4a 100644 --- a/container/scheduler-dev/Dockerfile +++ b/container/scheduler-dev/Dockerfile @@ -8,7 +8,7 @@ MAINTAINER chief taxcom@tom.com RUN sed -ri.origin 's|^https?://dl-cdn.alpinelinux.org|http://mirrors.huaweicloud.com%7Cg' /etc/apk/repositories
RUN umask 002 && \
- echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \
- gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install rest-client activesupport bigdecimal open3 && \ gem install git json yaml && \ gem install cucumber
diff --git a/container/scheduler/Dockerfile b/container/scheduler/Dockerfile index edac026..0ad813c 100644 --- a/container/scheduler/Dockerfile +++ b/container/scheduler/Dockerfile @@ -11,7 +11,7 @@ RUN apk add --no-cache 'ruby-dev' \ 'g++' 'gcc' 'pcre' 'libevent' 'make' 'git' 'cpio' 'bash'
RUN umask 002 && \
- echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc && \
- gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install rest-client && \ gem install activesupport && \ gem install git && \
diff --git a/container/webhook/Dockerfile b/container/webhook/Dockerfile index 9299bb6..1d5ee7c 100644 --- a/container/webhook/Dockerfile +++ b/container/webhook/Dockerfile @@ -13,7 +13,7 @@ RUN apk update && \ apk add --no-cache git && \ apk add npm ruby-dev
-RUN echo ':sources: ["http://rubygems.org"]' >> ~/.gemrc +RUN gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/
RUN npm install git-webhook-handler && \ gem install bunny -- 2.23.0