dj2 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/image_helper.rb +11 -7
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 848d73295a98c6a439b77567d6438522cd65afa4
|
4
|
+
data.tar.gz: b7dc9b3d1de37fb2f085fa614eea56625f615a65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5aa38d258eeee87fb43663c46110964c2b37778ec4985dc34f9600e5550d2d08db91260959bb5b141cff7d08af13ee3820f07f7c02bb09b5c442cb67a4b65c5a
|
7
|
+
data.tar.gz: 110aa2269af8cfd1643192aca62513f394f00a91470b8ccbb217e1383aaba2927ab2af2f9627b7925e0aebca5991b495152920a46023ae981b46261ec8126a3b
|
data/lib/image_helper.rb
CHANGED
@@ -8,12 +8,14 @@ module DockerJockey
|
|
8
8
|
end
|
9
9
|
image_name = args[0]
|
10
10
|
filename = args[1]
|
11
|
-
|
12
|
-
|
11
|
+
# tmpdir = 'tmp/app'
|
12
|
+
# FileUtils.mkdir_p tmpdir
|
13
|
+
# DockerJockey.exec("cp -r . #{tmpdir}")
|
13
14
|
entrypoint = [entry]
|
14
15
|
entrypoint << filename if filename
|
15
16
|
# exec("cp /scripts/lib/Dockerfile /tmp/app")
|
16
|
-
|
17
|
+
dockerfile = "__Dockerfile__"
|
18
|
+
File.open(dockerfile, 'w') { |file|
|
17
19
|
file.write("FROM #{from}
|
18
20
|
WORKDIR /app
|
19
21
|
COPY . /app/
|
@@ -22,10 +24,12 @@ module DockerJockey
|
|
22
24
|
}
|
23
25
|
# DockerJockey.exec("cat /tmp/app/Dockerfile")
|
24
26
|
# DockerJockey.exec("ls -al /tmp/app")
|
25
|
-
FileUtils.cd(
|
26
|
-
DockerJockey.exec("
|
27
|
-
DockerJockey.exec("
|
28
|
-
end
|
27
|
+
# FileUtils.cd(tmpdir) do
|
28
|
+
DockerJockey.exec("docker version")
|
29
|
+
DockerJockey.exec("docker build -t #{image_name} -f #{dockerfile} .")
|
30
|
+
# end
|
31
|
+
File.delete(dockerfile)
|
32
|
+
|
29
33
|
end
|
30
34
|
end
|
31
35
|
end
|
data/lib/version.rb
CHANGED