sjtug / mirror-docker

Dockerfile for SJTUG mirror
https://mirrors.sjtug.sjtu.edu.cn
GNU Affero General Public License v3.0
31 stars 6 forks source link

Build Failure: corrupted gem & fetchError #3

Closed htfy96 closed 8 years ago

htfy96 commented 8 years ago
Step 17 : RUN bundle install 
---> Running in acc5bcb5c7f8
 Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
 Fetching gem metadata from https://ruby.taobao.org/............ 
Fetching version metadata from https://ruby.taobao.org/.. 
Resolving dependencies...... 
Bundler::GemspecError:
 Could not read gem at /var/lib/gems/2.3.0/cache/RedCloth-4.2.9.gem. It may be corrupted. Gem::RemoteFetcher::UnknownHostError: timed out (https://ruby.taobao.org/gems/i18n-0.7.0.gem) 
Using json 1.8.3
 Using minitest 5.8.4
 Installing thread_safe 0.3.5
 Gem::RemoteFetcher::FetchError: too many connection resets (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/gems/addressable-2.4.0.gem)
 Gem::RemoteFetcher::FetchError: too many connection resets (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/gems/babel-source-5.8.35.gem)
 Using execjs 2.6.0
 Installing coffee-script-source 1.10.0
 Using colorator 0.1
 Using ffi 1.9.10
 Installing multipart-post 2.0.0
 Gem::RemoteFetcher::UnknownHostError: timed out (https://ruby.taobao.org/gems/gemoji-2.1.0.gem)
 Installing net-dns 0.8.0
 Bundler::GemspecError: Could not read gem at /var/lib/gems/2.3.0/cache/public_suffix-1.5.3.gem. It may be corrupted.
 Gem::RemoteFetcher::FetchError: too many connection resets (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/gems/sass-3.4.22.gem)
 Installing rb-fsevent 0.9.7 Using kramdown 1.10.0 Installing liquid 3.0.6 Using mercenary 0.3.5 Using rouge 1.10.1 Using safe_yaml 1.0.4 Installing jekyll-feed 0.4.0 Gem::RemoteFetcher::UnknownHostError: timed out (https://ruby.taobao.org/gems/mini_portile2-2.0.0.gem)
 Using jekyll-paginate 1.1.0
 Installing jekyll-sitemap 0.10.0
 Using rdiscount 2.1.8
 Installing redcarpet 3.3.3 with native extensions Installing terminal-table 1.5.2
 Using bundler 1.11.2
 An error occurred while installing RedCloth (4.2.9), and Bundler cannot continue. Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling.
 Removing intermediate container acc5bcb5c7f8
 The command '/bin/sh -c bundle install' returned a non-zero code: 5
mrmiywj commented 8 years ago

May be you should manually gem install RedCloth -v '4.2.9' Bundle may not always install the dependencies automatically.

在 2016年4月5日,下午12:20,lz96 notifications@github.com 写道:

Step 17 : RUN bundle install ---> Running in acc5bcb5c7f8 Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. Fetching gem metadata from https://ruby.taobao.org/............ Fetching version metadata from https://ruby.taobao.org/.. Resolving dependencies...... Bundler::GemspecError: Could not read gem at /var/lib/gems/2.3.0/cache/RedCloth-4.2.9.gem. It may be corrupted. Gem::RemoteFetcher::UnknownHostError: timed out (https://ruby.taobao.org/gems/i18n-0.7.0.gem) Using json 1.8.3 Using minitest 5.8.4 Installing thread_safe 0.3.5 Gem::RemoteFetcher::FetchError: too many connection resets (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/gems/addressable-2.4.0.gem) Gem::RemoteFetcher::FetchError: too many connection resets (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/gems/babel-source-5.8.35.gem) Using execjs 2.6.0 Installing coffee-script-source 1.10.0 Using colorator 0.1 Using ffi 1.9.10 Installing multipart-post 2.0.0 Gem::RemoteFetcher::UnknownHostError: timed out (https://ruby.taobao.org/gems/gemoji-2.1.0.gem) Installing net-dns 0.8.0 Bundler::GemspecError: Could not read gem at /var/lib/gems/2.3.0/cache/public_suffix-1.5.3.gem. It may be corrupted. Gem::RemoteFetcher::FetchError: too many connection resets (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/gems/sass-3.4.22.gem) Installing rb-fsevent 0.9.7 Using kramdown 1.10.0 Installing liquid 3.0.6 Using mercenary 0.3.5 Using rouge 1.10.1 Using safe_yaml 1.0.4 Installing jekyll-feed 0.4.0 Gem::RemoteFetcher::UnknownHostError: timed out (https://ruby.taobao.org/gems/mini_portile2-2.0.0.gem) Using jekyll-paginate 1.1.0 Installing jekyll-sitemap 0.10.0 Using rdiscount 2.1.8 Installing redcarpet 3.3.3 with native extensions Installing terminal-table 1.5.2 Using bundler 1.11.2 An error occurred while installing RedCloth (4.2.9), and Bundler cannot continue. Make sure that gem install RedCloth -v '4.2.9' succeeds before bundling. Removing intermediate container acc5bcb5c7f8 The command '/bin/sh -c bundle install' returned a non-zero code: 5 — You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/sjtug/mirror-docker/issues/3

lv-zheng commented 8 years ago

Dockerfile跟Docker官方推荐的写法差别很大。修复之后大概就能好

htfy96 commented 8 years ago

@mrmiywj @lv-zheng I guess there are two problems for us to resolve:

and I'm not familiar with bundler. If you have any idea, please assign yourself to this issue.

lv-zheng commented 8 years ago

根据docker官方文档,Dockerfile中不应该有apt-get upgrade,不应该安装没有必要的软件比如文本编辑器,而且应该将apt-get update与所有install放在一个run里面。我先去尝试把镜像弄到最小可用。

htfy96 commented 8 years ago

4

htfy96 commented 8 years ago

If it is fixed by #11 , this issue together with #5 will be closed.