public static boolean isContainerRunning(
        InspectContainerResponse.ContainerState state,
        Duration minimumRunningDuration,
        Instant now
    ) {
        if (state.getRunning()) {
            if (minimumRunningDuration == null) {
                return true;
            }
            Instant startedAt = DateTimeFormatter.ISO_OFFSET_DATE_TIME.parse(state.getStartedAt(), Instant::from);

            if (startedAt.isBefore(now.minus(minimumRunningDuration))) {
                return true;
            }
        }
        return false;
    }
Based on this status, is this container running, and has it been doing so for the specified amount of time?

@param state                  the state provided by InspectContainer
@param minimumRunningDuration minimum duration to consider this as "solidly" running, or null
@param now                    the time to consider as the current time
@return true if we can conclude that the container is running, false otherwise
core/src/main/java/org/testcontainers/utility/DockerStatus.java