Skip to content

Docker can't handle GwPriority as float #537

@sergi0g

Description

@sergi0g

Hello,

I was trying to use bollard to create a container with a gw_priority, but received the following error:

Docker responded with status code 400: invalid JSON: json: cannot unmarshal number 0.0 into Go struct field EndpointSettings.NetworkingConfig.EndpointsConfig.GwPriority of type int

I'm not sure why this was chosen, but gw_priority takes an Option<f64> (https://docs.rs/bollard/latest/bollard/secret/struct.EndpointSettings.html#structfield.gw_priority). Since the daemon can't handle floats, I'd suggest moving to a u64 instead. Can you please fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopenapi

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions