indocker 0.3.4 → 0.3.5
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 +3 -0
- 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: 0ace9121628e29137ad50db6a6ced1e89a8295d352f4df94292a9bf16dc3febb
|
4
|
+
data.tar.gz: 031a8379c69ef612d6782e4246f030eb747582b47f28a1eacedb79c5d345b5f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24e0c0e996ceaccd442fb3513eedc4aa037720d6054a9696a9139d75c11262720290c5d2c1cd46545e1065689a9a518ad18c0a1bc2ead53e896db7fc0d81f24b
|
7
|
+
data.tar.gz: e620e1c14a5cc29e3bacc68cbdf72f9983fe951c510501b3c12703c3e0e8db3a9964af031086f573cf8e4e2101148772c44e4c51b347b590542f967fad04c071
|
@@ -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) }
|
@@ -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