apocas / dockerode-compose

docker-compose in Node.js using dockerode
Apache License 2.0
141 stars 30 forks source link

`buildNetworks` broken after refactoring #20

Closed sigilworks closed 2 years ago

sigilworks commented 2 years ago

The buildNetworks function in the latest release of dockerode-compose (v1.3.1) is broken.

It seems there was a refactoring in commit dea731526da26549562c242a8724692eb7a89144 back in May 2021 that broke buildNetworks in serviceTools.js.

In the first conditional (if serviceNetworks is an array):

So calling Compose#up on a docker-compose.yml that has services with networks defined causes the operation to fail, when it gets to services.js line 168.

apocas commented 2 years ago

Fixed on https://github.com/apocas/dockerode-compose/pull/22