docker-builder 0.1.11 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/docker_builder/cli.rb +5 -5
- data/lib/docker_builder/server_settings.rb +2 -1
- data/lib/docker_builder/version.rb +1 -1
- data/readme.md +41 -7
- 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: d881511665b52826f0f8e369a352bac25d63b06c
|
4
|
+
data.tar.gz: ddbb779ff4ea383842c19af5bced4f8c7ad5cbb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ae3492ddd49936ce1bd1e2344d4f1a4858caabd5265a068e5352dbfc6681faac2162adaee6be19394a861e7f18dc67d01584306003748d5aa40f105baffe5d2
|
7
|
+
data.tar.gz: 41136426282739c7726d7aa103f8e7b527a3fe97c08b26209e4ba6030fd30dc5c04507b2aa13fb6a875ef870dca9eda69f31d70a5fbc37489287d171ab74ea6a
|
data/lib/docker_builder/cli.rb
CHANGED
@@ -33,7 +33,7 @@ class CLI < Thor
|
|
33
33
|
method_option :config_file,
|
34
34
|
:aliases => '-c',
|
35
35
|
:type => :string,
|
36
|
-
:default => '',
|
36
|
+
:default => 'config.rb',
|
37
37
|
:desc => 'Path to your config.rb file.'
|
38
38
|
|
39
39
|
def build
|
@@ -121,7 +121,7 @@ class CLI < Thor
|
|
121
121
|
method_option :config_file,
|
122
122
|
:aliases => '-c',
|
123
123
|
:type => :string,
|
124
|
-
:default => '',
|
124
|
+
:default => 'config.rb',
|
125
125
|
:desc => 'Path to your config.rb file.'
|
126
126
|
|
127
127
|
def destroy_image
|
@@ -181,7 +181,7 @@ class CLI < Thor
|
|
181
181
|
method_option :config_file,
|
182
182
|
:aliases => '-c',
|
183
183
|
:type => :string,
|
184
|
-
:default => '',
|
184
|
+
:default => 'config.rb',
|
185
185
|
:desc => 'Path to your config.rb file.'
|
186
186
|
|
187
187
|
def up
|
@@ -241,7 +241,7 @@ class CLI < Thor
|
|
241
241
|
method_option :config_file,
|
242
242
|
:aliases => '-c',
|
243
243
|
:type => :string,
|
244
|
-
:default => '',
|
244
|
+
:default => 'config.rb',
|
245
245
|
:desc => 'Path to your config.rb file.'
|
246
246
|
|
247
247
|
def destroy
|
@@ -301,7 +301,7 @@ class CLI < Thor
|
|
301
301
|
method_option :config_file,
|
302
302
|
:aliases => '-c',
|
303
303
|
:type => :string,
|
304
|
-
:default => '',
|
304
|
+
:default => 'config.rb',
|
305
305
|
:desc => 'Path to your config.rb file.'
|
306
306
|
|
307
307
|
def stop
|
@@ -102,7 +102,7 @@ class ServerSettings
|
|
102
102
|
if v =~ /^\./
|
103
103
|
s = v.gsub /^\.\//, ''
|
104
104
|
|
105
|
-
res = "$PWD/#{self.name}/#{s}"
|
105
|
+
res = "$PWD/servers/#{self.name}/#{s}"
|
106
106
|
|
107
107
|
elsif v =~ /^\/\//
|
108
108
|
res = self.attributes['common']['dir_data']+(v.gsub /^\/\//, '')
|
@@ -218,6 +218,7 @@ class ServerSettings
|
|
218
218
|
end
|
219
219
|
|
220
220
|
|
221
|
+
|
221
222
|
###
|
222
223
|
def [](key)
|
223
224
|
attributes[key]
|
data/readme.md
CHANGED
@@ -26,6 +26,14 @@ Provision during installation container on the host machine by:
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
+
# Installation
|
30
|
+
|
31
|
+
* Install gem:
|
32
|
+
```
|
33
|
+
gem install docker-builder
|
34
|
+
```
|
35
|
+
|
36
|
+
|
29
37
|
|
30
38
|
# Quickstart
|
31
39
|
|
@@ -225,13 +233,6 @@ http://localhost:8080
|
|
225
233
|
```
|
226
234
|
|
227
235
|
|
228
|
-
# Installation
|
229
|
-
|
230
|
-
|
231
|
-
Install gem:
|
232
|
-
```
|
233
|
-
$ gem install docker-builder
|
234
|
-
```
|
235
236
|
|
236
237
|
|
237
238
|
|
@@ -377,9 +378,42 @@ data for nginx server:
|
|
377
378
|
|
378
379
|
# Build container
|
379
380
|
|
381
|
+
## Build from Dockerfile
|
382
|
+
|
383
|
+
* config for server
|
384
|
+
```
|
385
|
+
'build' => {
|
386
|
+
'build_type' => 'Dockerfile',
|
387
|
+
"image_name" => "myname",
|
388
|
+
|
389
|
+
"base_image" => {} # not used
|
390
|
+
},
|
391
|
+
```
|
392
|
+
|
380
393
|
# Run container
|
381
394
|
|
382
395
|
|
396
|
+
## Run from existing image
|
397
|
+
|
398
|
+
* config for server
|
399
|
+
```
|
400
|
+
'build' => {
|
401
|
+
'build_type' => 'none',
|
402
|
+
"image_name" => "myname",
|
403
|
+
|
404
|
+
"base_image" => {
|
405
|
+
"name" => "mysql",
|
406
|
+
"repository" => "mysql",
|
407
|
+
"tag" => "3.4.9"
|
408
|
+
},
|
409
|
+
},
|
410
|
+
|
411
|
+
```
|
412
|
+
|
413
|
+
it will NOT build a new Docker image.
|
414
|
+
|
415
|
+
|
416
|
+
|
383
417
|
## Run Docker container with Chef
|
384
418
|
|
385
419
|
* run recipe install_host which runs on the host machine (not in container)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Ivak
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|