public CouchbaseContainer withServiceQuota(final CouchbaseService service, final int quotaMb) {
        checkNotRunning();
        if (!service.hasQuota()) {
            throw new IllegalArgumentException("The provided service (" + service + ") has no quota to configure");
        }
        if (quotaMb < service.getMinimumQuotaMb()) {
            throw new IllegalArgumentException(
                "The custom quota (" +
                quotaMb +
                ") must not be smaller than the " +
                "minimum quota for the service (" +
                service.getMinimumQuotaMb() +
                ")"
            );
        }
        this.customServiceQuotas.put(service, quotaMb);
        return this;
    }
Configures a custom memory quota for a given service.

@param service the service to configure the quota for.
@param quotaMb the memory quota in MB.
@return this {@link CouchbaseContainer} for chaining purposes.
modules/couchbase/src/main/java/org/testcontainers/couchbase/CouchbaseContainer.java