docker-utils 0.1.27 → 0.1.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/share/scripts/toolchain +6 -32
- 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: 0bad5e2f47d82f10790f4d3a2db6be2bbb4a88b4
|
4
|
+
data.tar.gz: 6268628994d02a1ace95e01f4d50f58f4f756054
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f35011da2cdfa02244520f6884b42d85c4a9f99417027bc1c954f7312c79ded136ecf504d7e1bbb63bb77e2489ef20b168a31a35ddf461b39e09466dd27830e2
|
7
|
+
data.tar.gz: f899526cb68e29a9fe56d6cc4cbc00521d310b6a5bf843fcf68df77251c90cb6bf3d92cb2ad80af820abdd323306f70d1124af8db1a78ee58e4b1e7c8a7f3c92
|
data/share/scripts/toolchain
CHANGED
@@ -61,13 +61,7 @@ if host_repo_root
|
|
61
61
|
|
62
62
|
toolchain_docker_args.concat([
|
63
63
|
'-v', "#{host_repo_root}:#{guest_repo_root}",
|
64
|
-
'-w',
|
65
|
-
])
|
66
|
-
|
67
|
-
data_container_name = host_repo_root.basename.to_s + "-build"
|
68
|
-
|
69
|
-
toolchain_docker_args.concat([
|
70
|
-
"--volumes-from=#{data_container_name}"
|
64
|
+
'-w', guest_repo_root.to_s
|
71
65
|
])
|
72
66
|
end
|
73
67
|
|
@@ -82,7 +76,11 @@ container_env_keys = `docker inspect -f '{{.Config.Env}}' #{toolchain_image}`.ch
|
|
82
76
|
toolchain_docker_args.concat((exposed_env_keys - container_env_keys).map{ |k| ['-e', k] }.flatten)
|
83
77
|
|
84
78
|
toolchain_docker_args.concat([
|
85
|
-
'-v',
|
79
|
+
'-v', '/run:/run/host',
|
80
|
+
'-v', "#{ENV['HOME']}/.dockercfg:/root/.dockercfg",
|
81
|
+
|
82
|
+
'-v', "#{ENV['HOME']}/.ssh:/root/.ssh",
|
83
|
+
'-v', "#{ENV['HOME']}/.gnupg:/root/.gnupg",
|
86
84
|
])
|
87
85
|
|
88
86
|
# network options
|
@@ -100,28 +98,4 @@ toolchain = lambda do |*subcommand|
|
|
100
98
|
*subcommand
|
101
99
|
end
|
102
100
|
|
103
|
-
if data_container_name
|
104
|
-
data_container_image = 'tianon/true:latest'
|
105
|
-
data_container_image_available = system docker_bin_path, 'inspect', '-f', '{{.Id}}', data_container_image, out: '/dev/null', err: '/dev/null'
|
106
|
-
unless data_container_image_available or system(docker_bin_path, 'pull', data_container_image)
|
107
|
-
$stderr.puts "could not locate data-container image '#{data_container_image}'; aborting"
|
108
|
-
Kernel.exit 1
|
109
|
-
end
|
110
|
-
|
111
|
-
data_container_exists = system docker_bin_path, 'inspect', '-f', '{{.Id}}', data_container_name, out: '/dev/null', err: '/dev/null'
|
112
|
-
|
113
|
-
#toolchain.call 'find', '/build', '-mindepth', '1', '-maxdepth', '1', '-type', 'l', '-exec', 'rm', '{}', ';'
|
114
|
-
unless data_container_exists
|
115
|
-
Kernel.system(
|
116
|
-
docker_bin_path, 'run',
|
117
|
-
"--name=#{data_container_name}",
|
118
|
-
'-v', '/build',
|
119
|
-
data_container_image
|
120
|
-
)
|
121
|
-
|
122
|
-
toolchain.call 'find', '/src', '-mindepth', '1', '-maxdepth', '1', '-exec', 'ln', '-sF', '{}', ';'
|
123
|
-
end
|
124
|
-
end
|
125
|
-
|
126
|
-
|
127
101
|
toolchain.call *toolchain_subcommand_args
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Levi Aul
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-uuid
|