Skip to content

More issues with ports in payloads #8

@edanuff

Description

@edanuff

I'm afraid my pervious pull request was probably the wrong approach. I think the better thing would have been to change the definition of ports in Container to List<Port> here https://github.com/docker-java/docker-java/blob/master/src/main/java/com/github/dockerjava/client/model/Container.java#L43

In the other places, it appears that the ports are specific in the original PortMap format.

Here's the summary of places where this is an issue:

Container.ports is a List<Port> (see http://docs.docker.com/reference/api/docker_remote_api_v1.12/#list-containers)

ContainerInspectResponse.NetworkSettings.portMapping is deprecated, but it's a Map<String,String> (see https://github.com/dotcloud/docker/blob/master/daemon/network_settings.go)

HostConfig.portBindings is a PortMap (see http://docs.docker.com/reference/api/docker_remote_api_v1.12/#inspect-a-container)

StartContainerConfig.portBindings is a PortMap (see http://docs.docker.com/reference/api/docker_remote_api_v1.12/#start-a-container)

I'll work on a pull request to fix these.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions