balena-io-modules / balena-compose

Complete toolkit for building docker-compose.yml files and optionally deploy them on balenaCloud
Apache License 2.0
8 stars 0 forks source link

Consider restricting network `driver_opts` to string values #18

Open pipex opened 1 year ago

pipex commented 1 year ago

While the docker-compose specification accepts both strings and numbers, using a number seems to be rejected on the engine with a JSON unmarshaling error

(HTTP code 400) unexpected - json: cannot unmarshal number into Go struct field NetworkCreateRequest.Options of type string

This after pushing this valid network configuration

networks:
  default:
    driver_opts:
      com.docker.network.driver.mtu: 1420

Leaving this as an issue for discussion

jellyfish-bot commented 1 year ago

[pipex] This has attached https://jel.ly.fish/cb692d35-d429-4120-acad-915644b94aee