diff --git a/docker-compose-generator/src/Program.cs b/docker-compose-generator/src/Program.cs index 9d0d293..39e45bf 100644 --- a/docker-compose-generator/src/Program.cs +++ b/docker-compose-generator/src/Program.cs @@ -94,7 +94,8 @@ namespace DockerGenerator foreach(var fragment in composition.AdditionalFragments) { - fragments.Add(fragment.Trim()); + if(!string.IsNullOrWhiteSpace(fragment)) + fragments.Add(fragment.Trim()); } var def = new DockerComposeDefinition(name, fragments);