private void addPorts(StringBuilder b) {
        if (ports.size() > 0) {
            String[] portsS = new String[ports.size()];
            int i = 0;
            for(String port : ports) {
            	portsS[i++] = validatePortExposure(port);
            }
            DockerFileKeyword.EXPOSE.addTo(b, portsS);
        }
    }
Escape any slashes, quotes, and newlines int the value.  If any escaping occurred, quote the value.
@param key The key
@param value The value
@return Escaped and quoted key="value"
src/main/java/io/fabric8/maven/docker/assembly/DockerFileBuilder.java