private URI buildLivenessUri(int livenessCheckPort) {
        final String scheme = (tlsEnabled ? "https" : "http") + "://";
        final String host = waitStrategyTarget.getHost();

        final String portSuffix;
        if ((tlsEnabled && 443 == livenessCheckPort) || (!tlsEnabled && 80 == livenessCheckPort)) {
            portSuffix = "";
        } else {
            portSuffix = ":" + livenessCheckPort;
        }

        return URI.create(scheme + host + portSuffix + path);
    }
Build the URI on which to check if the container is ready.

@param livenessCheckPort the liveness port
@return the liveness URI
core/src/main/java/org/testcontainers/containers/wait/strategy/HttpWaitStrategy.java