dockerb 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dockerb/version.rb +1 -1
- data/lib/dockerb.rb +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14d5e41c4d635b290a505132331122c259fce1d3
|
4
|
+
data.tar.gz: 3ddd2abea4d80f62f6ce84474f77b25d519a8f04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99474e7578b8ebe576d04407908eb43c6482da4db61367488a07a96b21de8e9fdfdc6046adbfad1b8e04f00fc727be348e9c822a1df630418fc3da889270af99
|
7
|
+
data.tar.gz: dcea795e9c15eb366c15668b722f9453a8862c1d00ec4bc633bd451e6a009f3243c47674e63b1e79e888f69aaca16300d51f50c415da2281c949cb51c909e01c
|
data/lib/dockerb/version.rb
CHANGED
data/lib/dockerb.rb
CHANGED
@@ -26,13 +26,18 @@ module Dockerb
|
|
26
26
|
ADD Gemfile /app/
|
27
27
|
ADD Gemfile.lock /app/
|
28
28
|
ADD vendor/cache /app/vendor/cache
|
29
|
-
RUN bundle install --quiet --local --jobs 4 || bundle check
|
29
|
+
RUN (bundle install --quiet --local --jobs 4 || bundle check) && #{delete_gem_junk}
|
30
30
|
EOF
|
31
31
|
end
|
32
32
|
|
33
33
|
def install_gem(name)
|
34
34
|
version = File.read("Gemfile.lock")[/^ #{name} \((.+)\)/, 1] || raise("Gem #{name} not found in Gemfile.lock")
|
35
|
-
"RUN gem install -v #{version} #{name}"
|
35
|
+
"RUN gem install -v #{version} #{name} && #{delete_gem_junk}"
|
36
|
+
end
|
37
|
+
|
38
|
+
# lower image size by not shipping test/spec/ext files
|
39
|
+
def delete_gem_junk
|
40
|
+
%{find /usr/local/lib/ruby/gems/*/gems/ -maxdepth 2 -name "ext" -o -name "test" -o -name "spec" | xargs rm -r}
|
36
41
|
end
|
37
42
|
end
|
38
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dockerb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: michael@grosser.it
|