private void createMapping(String[] parts, String protocol) {
        if (parts.length == 3) {
            mapBindToAndHostPortSpec(parts[0], parts[1], createPortSpec(parts[2], protocol));
        } else if (parts.length == 2) {
            mapHostPortToSpec(parts[0], createPortSpec(parts[1], protocol));
        } else {
            mapHostPortToSpec(null, createPortSpec(parts[0], protocol));
        }
    }
Return the content of the mapping as an array with all specifications as given

@return port mappings as JSON array or null if no mappings exist
src/main/java/io/fabric8/maven/docker/access/PortMapping.java