Konstantin Köhring
d07ce54dd0
Quote all string values to reduce probability of compose syntax errors ( #51 )
...
* Fix a bug where strings with special characters are not quoted
Before:
```
...
services:
<service>:
....
logging:
options:
tag: {{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}
max-file: 3
...
```
and docker-compose up fails
after:
```
...
services:
<service>:
....
logging:
options:
tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"
max-file: "3"
...
```
and docker-compose up works
* Remove no longer necessary workarounds
2022-11-14 01:07:13 -05:00
Juan Biondi
0aa4522143
Fix issue on index out of error ( #54 )
...
* Add gather info about all networks in the system.
* Only generate host networks if all info is required.
* Fix issue getting network information.
Co-authored-by: Juan Biondi <juan@payslip.com >
2022-11-07 15:00:39 -05:00
Juan Biondi
dea3d848e8
Add gather info about all networks in the system. ( #53 )
...
* Add gather info about all networks in the system.
* Only generate host networks if all info is required.
Co-authored-by: Juan Biondi <juan@payslip.com >
2022-11-02 16:39:39 -04:00
Red5d
85e398193f
Update README with note on how to validate output.
2022-08-20 14:46:27 -04:00
Red5d
dfc73d0bbd
Update compose version 3 to 3.6.
...
With somewhat-recent docker features and spec changes that have been included in the compose file generation for this script, specifying compose file version 3.6 (at least) is necessary for the output compose file to pass validation using "docker-compose config".
2022-08-20 14:39:29 -04:00
Red5d
1768a65fce
Fixes the --all option, volumes of type 'bind' and read only option ( #46 )
...
(from @d-EScape)
One PR that includes my suggestions for #17 and some new ones:
The -all option would not work because every iteration of container_names could set the 'networks' and 'volumes' to None. Even if a previous container had a network. Later iterations could not add a network, because it was no longer a dict, resulting in an exception.
The code might need some cleaning up. I left some comments and old pieces (commented out) to explain to @Red5d what I did and why. Since I am new to this script and the docker-compose format i might have overlooked something. Please check.
Co-authored-by: d-EScape <8693608+d-EScape@users.noreply.github.com >
2022-08-20 14:36:47 -04:00
acdoussan
357fef9782
better handling for default networks ( #42 )
...
* better handling for default networks
* fix for issues/43
* check for none explictly rather than allowing truthy/falsy conversion
* update to read volume data from mounts, rather than host config binds
Co-authored-by: Adam Doussan <acdoussan@Adams-MacBook-Pro.local >
2022-08-14 17:54:43 -04:00
acdoussan
0c4ff4fb25
Fix volumes missing in generated compose file ( #41 )
...
* fix volume export based off of https://github.com/Red5d/docker-autocompose/issues/17#issuecomment-943041549
* remove unneeded space
* export volumes in addition to networks
* fix syntax error
* actuall fix syntax errors
Co-authored-by: Adam Doussan <acdoussan@Adams-MacBook-Pro.local >
2022-08-13 16:31:05 -04:00
Red5d
e19c4654af
Merge pull request #38 from ostafen/master
...
Add -a/--all flag to list all containers
2022-04-09 22:12:19 -04:00
Stefano
d6dddedb3d
Add -a/--all flag to list all containers
2022-04-09 09:30:14 +02:00
Red5d
0dfdac353f
Merge pull request #36 from ostafen/master
...
Format properly date/datetime labels
2022-03-16 09:24:12 -04:00
Red5d
a8f00e0deb
Merge pull request #37 from alexanderpetrenz/master
...
Adding Name Attribute to each Network
2022-03-16 08:45:53 -04:00
alexanderpetrenz
adf98bb062
Merge branch 'Red5d:master' into master
2022-03-11 09:26:21 +01:00
Alexander Petrenz
1af6b49233
added name attribute to every retrieved network
2022-03-11 08:59:55 +01:00
Alexander Petrenz
40aaf8e82c
fixed network retrieval
2022-03-11 08:59:47 +01:00
Stefano
63810906f9
Format properly date/datetime labels
2022-03-10 20:45:35 +01:00
Red5d
e32c9d4275
Merge pull request #35 from ostafen/master
...
Fix ERROR: network must be a mapping, not an array.
2022-03-10 14:04:38 -05:00
Stefano
caa747b605
Fix ERROR: network must be a mapping, not an array.
2022-03-10 15:32:50 +01:00
Red5d
d783902265
Merge pull request #34 from alexanderpetrenz/master
...
command property: replace string concatenation by taking over given list
2022-03-09 08:10:19 -05:00
Alexander Petrenz
e6badd31c3
now collecting networks not present in every container
2022-03-08 15:49:49 +01:00
Alexander Petrenz
3f756235b2
command property: replace string concatenation by taking over given list
2022-03-08 14:33:33 +01:00
Red5d
b9c096dd94
Merge pull request #33 from moschlar/patch-1
...
Update autocompose.py
2022-03-07 14:50:04 -05:00
Moritz Schlarb
e7dbe41f23
Update autocompose.py
...
Print error message to stderr so that I will be seen when redirecting stdout to `docker-compose.yml`
2022-03-07 11:56:06 +01:00
Red5d
d976d520b4
Merge pull request #32 from hgghyxo/patch-1
...
Update README.md
2022-02-24 11:14:25 -05:00
hgghyxo
ec211717ed
Update README.md
...
adding a oneliner to print out all containers
2022-02-24 11:49:46 +01:00
Red5d
4e8ff192dc
Updates about ARM support, dependency listing, and formatting/wording
1.1
2021-08-07 14:06:52 -04:00
Red5d
8ada367b9e
Enable generating compose files for containers that aren't running.
2021-08-07 13:51:02 -04:00
Red5d
94ca597f3d
Merge pull request #23 from LunaticMuch/fix/six-module
...
fix: six module missing
Not sure why this wasn't necessary before, but it definitely needs it now.
2021-08-07 13:40:14 -04:00
Red5d
0ed2f306cc
Workaround for buildx not liking the capital letter in my username
2021-08-07 13:27:21 -04:00
Red5d
6415678751
Merge pull request #18 from doob187/master
...
I've added the secret key to the repo. Sorry this has taken a while. Life's been really busy and I forgot about this one.
2021-08-07 13:06:49 -04:00
doob187
4b5e27cf29
Merge branch 'Red5d:master' into master
2021-08-07 08:31:16 +02:00
LunaticMuch
d90e2d5389
fix: six module missing
2021-08-02 09:32:23 +01:00
Red5d
881b7979d5
Fix malformed 'devices' values
2021-07-28 23:43:07 -04:00
Red5d
a1f2aabdee
Fix lines that depend on the 'networks' key being in values list
2021-07-28 23:19:19 -04:00
Red5d
d8e5aacf20
Exclude the 'networks' key if only the default bridge network is present
2021-07-28 23:13:17 -04:00
Red5d
0556a35376
Remove fields that are invalid in the compose v3 spec
2021-07-28 23:03:54 -04:00
doob187
046f0e9da7
Update Dockerfile
2021-05-29 08:11:47 +02:00
doob187
9c3e01d167
Create docker.yml
2021-05-29 08:04:46 +02:00
Red5d
9f3960defd
Merge pull request #14 from akshaysalunke13/master
...
Fix yaml output to reflect latest docker-compose reference.
2021-03-15 10:28:46 -04:00
Akshay
98704a81b6
Fix 'networks' in yaml
...
fix opts following official compose reference
[docker-compose reference](https://docs.docker.com/compose/compose-file/compose-file-v3/ )
2021-03-14 21:05:41 +11:00
Akshay Salunke
a3ff6534ab
ignore ds_store file for mac
2021-03-14 17:50:13 +11:00
akshay-scalegrowth
555f1f90b3
Added requirements.txt for required packages
2021-03-14 16:29:26 +11:00
akshay-scalegrowth
09f14bceca
Added gitignore
2021-03-14 16:29:06 +11:00
Red5d
e0f6c83bc4
Merge pull request #13 from rootrider/master
...
Update README.md
2020-10-22 19:20:42 -04:00
Joel
7fe7a07fb5
Update README.md
...
correct the link to the newer docker python module
2020-10-22 14:54:00 -07:00
Red5d
4eb8d97536
Fixed typo in compose file version setting example.
2018-12-20 21:04:40 -05:00
Red5d
b78da97768
Add additional networks stanza at the bottom of the output to support the networks attached to the container(s).
2018-08-24 19:44:24 -04:00
Red5d
e5ac520ff6
Support networks and network aliases.
2018-08-24 17:49:55 -04:00
Red5d
9827c4488d
Updated README with new feature and usage information.
2018-07-27 20:44:14 -04:00
Red5d
800b088cea
Update setup script to use new docker module, bump minimum module versions, and overall app version.
2018-07-27 20:21:35 -04:00