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".
(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>
* 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>