indocker 0.3.4 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/indocker/images/image.rb +4 -1
- data/lib/indocker/images/template_compiler.rb +2 -0
- data/lib/indocker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e03a0049fdc315498757017b1353d48d835111b3fbdd58560ee0775edd9a6069
|
4
|
+
data.tar.gz: 59d579a9a956ea58ebb717e379d86949ac94e6522cc34a0b8982cbaa2a48f564
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28541ee745441392be17b677daa08e8b6ee6d01d55689fd7fa83f8df0ca4313352858bb583ed22bfa518b8693d7ef02996ceddc70616b5c18798779bc8ce92ce
|
7
|
+
data.tar.gz: a4b6cf05ff1aaac207d8c2119233a88470b04996b67d3e509ecfedc6a47f773ed4daac73b69390a0ab239c63ac4025f6c5c5f6c708b2130f45546efc7768bda7
|
@@ -1,4 +1,6 @@
|
|
1
1
|
class Indocker::Images::Image
|
2
|
+
DOCKERFILE = "Dockerfile"
|
3
|
+
|
2
4
|
attr_reader :name, :compile, :compile_rpaths, :dependent_images, :build_args
|
3
5
|
|
4
6
|
def initialize(name)
|
@@ -37,6 +39,7 @@ class Indocker::Images::Image
|
|
37
39
|
end
|
38
40
|
|
39
41
|
def compile?(path)
|
42
|
+
return true if path.include?(DOCKERFILE)
|
40
43
|
return false if !@compile
|
41
44
|
return true if @compile_rpaths.empty?
|
42
45
|
return true if @compile_rpaths.any? { |rpath| path.include?(rpath) }
|
@@ -57,7 +60,7 @@ class Indocker::Images::Image
|
|
57
60
|
@compile_rpaths = flag_or_rpaths
|
58
61
|
end
|
59
62
|
|
60
|
-
|
63
|
+
nil
|
61
64
|
end
|
62
65
|
|
63
66
|
def dockerfile
|
@@ -8,8 +8,10 @@ class Indocker::Images::TemplateCompiler
|
|
8
8
|
end
|
9
9
|
|
10
10
|
Indocker.logger.debug("compiling template file #{path}".grey)
|
11
|
+
|
11
12
|
template = File.read(path)
|
12
13
|
content = ERB.new(template).result(context.helper.get_binding)
|
14
|
+
|
13
15
|
File.write(path, content)
|
14
16
|
rescue Errno::EACCES => e
|
15
17
|
# do nothing for read only files
|
data/lib/indocker/version.rb
CHANGED