dockerfile2bash 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -6
- data/lib/dockerfile2bash.rb +2 -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: e862d14257ad0bcc0e3c62d885848188059fc7bc
|
4
|
+
data.tar.gz: 14c32b9f4300e0f88eade205b2f770f9792043b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c36dff075fd538e1d3000a6a5da840160baf37ba8c2781394a29331a27ab7ba98282ec8ebb24e94916ecea85c73ebf5ad0a863751ca38e465571fb09be93ba94
|
7
|
+
data.tar.gz: 14fedadd931e4a8448e5b71e59b21c88ddc0e2bce10074f8047a7182e9d12533336e960f613e5b9dc3a885a398e5ed66add85426c4c7dc9728bb33048ddc197b
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Dockerfile2bash -
|
1
|
+
# Dockerfile2bash - Convert a Dockerfile to Bash
|
2
2
|
|
3
3
|
`Dockerfile2bash` is used to parse a Dockerfile and convert it to a Bash script eventually. Maybe you can use it to convert massive Dockerfiles to shell scripts used in a metal installation.
|
4
4
|
|
@@ -24,17 +24,15 @@ Or install it yourself as:
|
|
24
24
|
require 'dockerfile2bash'
|
25
25
|
|
26
26
|
parser = Dockerfile2bash.new(<your_Dockerfile_path>)
|
27
|
-
# parse it at first
|
28
|
-
parser.parse
|
29
|
-
# you can check the parse results
|
30
|
-
puts parser.commands
|
27
|
+
# parse it at first and check the commands
|
28
|
+
commands = parser.parse
|
31
29
|
# then convert it to a Bash script
|
32
30
|
puts parser.generate_bash
|
33
31
|
```
|
34
32
|
|
35
33
|
### Commandline tool
|
36
34
|
|
37
|
-
|
35
|
+
A command named `df2sh` released with Dockerfile2bash. After installation the command will be available in your shell path.
|
38
36
|
|
39
37
|
```bash
|
40
38
|
df2sh /path/to/your/Dockerfile [output_bash_filename]
|
data/lib/dockerfile2bash.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'json'
|
2
2
|
|
3
3
|
class Dockerfile2bash
|
4
|
-
VERSION = '0.1.
|
4
|
+
VERSION = '0.1.1'
|
5
5
|
attr_reader :commands
|
6
6
|
FIELDS = %w(from user run add copy arg env expose cmd onbuild)
|
7
7
|
|
@@ -34,6 +34,7 @@ class Dockerfile2bash
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
37
|
+
@commands
|
37
38
|
end
|
38
39
|
|
39
40
|
def generate_bash()
|