mydocker 1.0.0 → 1.0.1
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/Gemfile.lock +1 -1
- data/README.md +71 -15
- data/lib/mydocker/version.rb +1 -1
- data/lib/mydocker.rb +13 -5
- data/{mydocker.yaml → mydocker.yml} +0 -0
- 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: f4b93bc2c7adc44de93e6323f52446fb1bbedcb0f424bc9dff3ea68f15ea800a
|
4
|
+
data.tar.gz: a889cac0ef1e0624c9a928db70b863bb99333823412943036d9461006171fdc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bb1b58d18e7be2c8457235b994086c642646b5a7857023f85e386cf18686b39a160e9a8bdd9e476483d4009318e897c46f4c6021e3e110847e5088ec09ccffd
|
7
|
+
data.tar.gz: 304c396e181f4f7f9b9aa10697872ce405ded4f731c9f5d23a4c7f74ee767bbd7956d297b212a8197ab1a35d63fd0b08cf8d93969470974d6e317855cacbe32c
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,29 +1,85 @@
|
|
1
|
-
#
|
1
|
+
# MyDocker
|
2
2
|
|
3
|
-
|
3
|
+
Mydocker extends the capacity of ionic cli, providing an refined app exporting experience.
|
4
4
|
|
5
|
-
|
5
|
+
*Shortlink https://git.io/fArWx*
|
6
6
|
|
7
|
-
##
|
7
|
+
## Table of Contents
|
8
|
+
- [Introduction](#introduction)
|
9
|
+
- [Installation](#installation)
|
10
|
+
- [Supported Os](#supported-os)
|
11
|
+
- [Requirements](#requirements)
|
12
|
+
- [Rubygems](#rubygems)
|
13
|
+
- [Usage](#usage)
|
14
|
+
- [Development](#development)
|
15
|
+
- [Contributing](#contributing)
|
16
|
+
- [License](#license)
|
17
|
+
- [Code of Conduct](#code-of-conduct)
|
18
|
+
|
19
|
+
## Introduction
|
20
|
+
|
21
|
+
MyDocker comes with a collection of short commands to work with docker, think it as a url shortener for docker, confusing? check it out!
|
8
22
|
|
9
|
-
|
23
|
+
## Installation
|
24
|
+
### Supported OS
|
25
|
+
- Mac
|
26
|
+
- Windows
|
27
|
+
- Linux
|
28
|
+
### Requirements
|
29
|
+
- Ruby
|
30
|
+
### Rubygems
|
31
|
+
|
32
|
+
Install it yourself as:
|
33
|
+
|
34
|
+
```sh
|
35
|
+
gem install mydocker
|
36
|
+
```
|
10
37
|
|
11
|
-
|
12
|
-
|
38
|
+
## Configuration
|
39
|
+
|
40
|
+
1. Create a ``mydocker.yaml`` file, you can place it in any place, with this content:
|
41
|
+
```yaml
|
42
|
+
---
|
43
|
+
projects:
|
44
|
+
- project:
|
45
|
+
name: "project-1"
|
46
|
+
path: '/Users/demo-user/project-1'
|
47
|
+
- project:
|
48
|
+
name: "project-2"
|
49
|
+
path: '/Users/demo-user/project-2'
|
13
50
|
```
|
51
|
+
> Use this file to inform mydocker of your docker projects, add as many projects as you want and mydocker will provide help to these projects.
|
14
52
|
|
15
|
-
|
53
|
+
2. With Everything setup, open your command line and run
|
16
54
|
|
17
|
-
|
55
|
+
```
|
56
|
+
chris
|
57
|
+
```
|
18
58
|
|
19
|
-
|
59
|
+
> It seems to be a strange command but there is a reason, later in this tutorial I explain to little more because chris is the mydocker main command.
|
20
60
|
|
21
|
-
|
61
|
+
3. Place your ``mydocker.yaml``location in the terminal then press enter
|
22
62
|
|
63
|
+
4. Now lets go to the next section on this documentation, why is chris so especial...
|
23
64
|
## Usage
|
65
|
+
MyDocker provides these commands up to you:
|
66
|
+
```sh
|
67
|
+
chris up # Start project with docker-compose
|
68
|
+
```
|
69
|
+
Can be used to boot with a code editor too
|
70
|
+
```sh
|
71
|
+
chris up atom # Start project with docker-compose & open atom editor on the docker project
|
72
|
+
```
|
73
|
+
If youl'd like to stop project
|
74
|
+
```sh
|
75
|
+
chris down # Destroys project with docker-compose
|
76
|
+
```
|
77
|
+
If youl'd like to use docker cli on a specific container
|
24
78
|
|
25
|
-
|
26
|
-
|
79
|
+
```sh
|
80
|
+
chris cli
|
81
|
+
```
|
82
|
+
> Provides access to a project container cli interface, if you do not provide any command bash will be used by default
|
27
83
|
## Development
|
28
84
|
|
29
85
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -32,7 +88,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
88
|
|
33
89
|
## Contributing
|
34
90
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
91
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/gabriellacerda/mydocker. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
92
|
|
37
93
|
## License
|
38
94
|
|
@@ -40,4 +96,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
40
96
|
|
41
97
|
## Code of Conduct
|
42
98
|
|
43
|
-
Everyone interacting in the
|
99
|
+
Everyone interacting in the Runapk project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/gabriellacerda/mydocker/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/mydocker/version.rb
CHANGED
data/lib/mydocker.rb
CHANGED
@@ -24,7 +24,7 @@ def setup()
|
|
24
24
|
#
|
25
25
|
# puts Dir.pwd
|
26
26
|
#
|
27
|
-
config = YAML.load_file("./mydocker.
|
27
|
+
config = YAML.load_file("./mydocker.yml")
|
28
28
|
if config["docker"]["file"].length > 0
|
29
29
|
options = [];
|
30
30
|
user_config = YAML.load_file("#{config["docker"]["file"]}")
|
@@ -37,7 +37,7 @@ def setup()
|
|
37
37
|
|
38
38
|
if selected_func == "release"
|
39
39
|
config["docker"]["file"] = "";
|
40
|
-
File.write('mydocker.
|
40
|
+
File.write('mydocker.yml', config)
|
41
41
|
abort()
|
42
42
|
end
|
43
43
|
|
@@ -87,16 +87,24 @@ def setup()
|
|
87
87
|
abort()
|
88
88
|
end
|
89
89
|
if selected_editor == nil
|
90
|
-
|
90
|
+
if selected_func == 'down'
|
91
|
+
cmd("(cd #{working_path} && docker-compose #{selected_func})")
|
92
|
+
else
|
93
|
+
cmd("(cd #{working_path} && docker-compose #{selected_func} -d)")
|
94
|
+
end
|
91
95
|
else
|
92
|
-
|
96
|
+
if selected_func == 'down'
|
97
|
+
cmd("(cd #{working_path} && docker-compose #{selected_func} && #{selected_editor} .)")
|
98
|
+
else
|
99
|
+
cmd("(cd #{working_path} && docker-compose #{selected_func} && #{selected_editor} .)")
|
100
|
+
end
|
93
101
|
end
|
94
102
|
phrase "MyDocker is a open source tool, if you would like to help visit: ".yellow + "https://github.com/gabriellacerda/mydocker".cyan
|
95
103
|
else
|
96
104
|
puts "Informe um arquivo de configuração"
|
97
105
|
config_file_path = prompt.ask("👰 Diretório do arquivo de configuração:")
|
98
106
|
config["docker"]["file"] = config_file_path;
|
99
|
-
File.
|
107
|
+
File.open('mydocker.yml', 'w') {|f| f.write config.to_yaml }
|
100
108
|
# puts "#{$PROGRAM_NAME}"
|
101
109
|
end
|
102
110
|
end
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mydocker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GabrielLacerda
|
@@ -32,7 +32,7 @@ files:
|
|
32
32
|
- lib/mydocker.rb
|
33
33
|
- lib/mydocker/version.rb
|
34
34
|
- mydocker.gemspec
|
35
|
-
- mydocker.
|
35
|
+
- mydocker.yml
|
36
36
|
- test/mydocker_test.rb
|
37
37
|
- test/test_helper.rb
|
38
38
|
homepage: https://github.com/gabriellacerda/mydocker
|