code: private String urlEncode(final String unencoded) throws DockerException {
      try {
        final String encode = URLEncoder.encode(unencoded, UTF_8.name());
        return encode.replaceAll("\\+", "%20");
      } catch (UnsupportedEncodingException e) {
        throw new DockerException(e);
      }
    }
docs: URL-encodes a string when used as a URL query parameter's value.
  
  @param unencoded A string that may contain characters not allowed in URL query parameters.
  @return URL-encoded String
  @throws DockerException if there's an UnsupportedEncodingException