I cannot find an example for it in the docs.
I tried to
const mongo = new MongoDBContainer()
.withEnvironment({
MONGO_INITDB_ROOT_USERNAME: dbUsername,
MONGO_INITDB_ROOT_PASSWORD: dbPassword,
})
.start();
but it appears that mongo.getConnectionString() does not include the creds...