docker_core 0.0.36 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/docker_core.rb +43 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f60a31f88b84a626d5cb8ae4d6006e14cb47a8b8b7b6583e7c9d6ad845f7a626
|
4
|
+
data.tar.gz: 78bd3e82dd1e50913d836e5ac69da7089cb731c17fb99bad0309de18fa80fa35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e409a3067d073d5cf8f70f1f12fb0ce4e720126c3824f7f7bd880f357e8e58b58d5e43f8c6ba014bf5722a8ac149fe4340541fc4ec7ad70cd4d16a5717d6ebdf
|
7
|
+
data.tar.gz: 7bc3c5234e7974a3cdf82374b0510489bbc4df98425d1726dec93c014f137f78a0ff5443c2b56d476a200d48f4f451a092c303125433735468d769057ffd2579
|
data/lib/docker_core.rb
CHANGED
@@ -113,13 +113,47 @@ module DockerCore
|
|
113
113
|
return File.expand_path('~/.swarm')
|
114
114
|
end
|
115
115
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
116
|
+
def self.profile_path
|
117
|
+
return File.realpath('profile.sh', self.deploy_path)
|
118
|
+
end
|
119
|
+
|
120
|
+
def self.runner_path
|
121
|
+
return File.realpath('runner.rb', self.deploy_path)
|
122
|
+
end
|
123
|
+
|
124
|
+
# @see https://github.com/moby/moby/issues/31564
|
125
|
+
# @see https://www.geeksforgeeks.org/how-to-validate-a-domain-name-using-regular-expression
|
126
|
+
# @param [String] name
|
127
|
+
# @param [Boolean] echo
|
128
|
+
def self.check_name(name, echo: false)
|
129
|
+
color = Color::YELLOW
|
130
|
+
name = "#{name}"
|
131
|
+
items = name.chars
|
132
|
+
|
133
|
+
if items.empty? || 63 < items.length
|
134
|
+
if echo
|
135
|
+
Color.echo("'#{name}' should be between 1 and 63 characters long", color)
|
136
|
+
end
|
137
|
+
|
138
|
+
return false
|
139
|
+
end
|
140
|
+
|
141
|
+
if [items.first, items.last].include?('-')
|
142
|
+
if echo
|
143
|
+
Color.echo("'#{name}' should not start or end with a hyphen(-)", color)
|
144
|
+
end
|
145
|
+
|
146
|
+
return false
|
147
|
+
end
|
148
|
+
|
149
|
+
test = name.match?(/^[a-zA-Z0-9-]+$/)
|
150
|
+
|
151
|
+
if false == test && echo
|
152
|
+
Color.echo("'#{name}' should be a-z or A-Z or 0-9 and hyphen (-)", color)
|
153
|
+
end
|
154
|
+
|
155
|
+
return test
|
156
|
+
end
|
123
157
|
|
124
158
|
# @param [String] swarm
|
125
159
|
def self.write_swarm(swarm = '')
|
@@ -583,8 +617,8 @@ module DockerCore
|
|
583
617
|
|
584
618
|
Process.run('deluser', USER, throw: false)
|
585
619
|
Process.run('delgroup', GROUP, throw: false)
|
586
|
-
Process.run('addgroup', { system: true, gid: gid }, GROUP
|
587
|
-
Process.run('adduser', { system: true, 'disabled-password': true, 'no-create-home': true, ingroup: GROUP, gecos: USER, shell: '/bin/bash', uid: uid }, USER
|
620
|
+
Process.run('addgroup', { system: true, gid: gid }, GROUP)
|
621
|
+
Process.run('adduser', { system: true, 'disabled-password': true, 'no-create-home': true, ingroup: GROUP, gecos: USER, shell: '/bin/bash', uid: uid }, USER)
|
588
622
|
end
|
589
623
|
|
590
624
|
# @param [String] stdout
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.39
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- agrozyme
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fileutils
|