Annotation Interface RequiresDocker


@Target(TYPE) @Retention(RUNTIME) @ExtendWith(DockerRequiredExtension.class) public @interface RequiresDocker
Annotation to mark test classes that require Docker or Podman to be available.

Checks for both Docker and Podman container engines.

When neither Docker nor Podman is available:

  • If -DskipDockerTests=true is set: tests are skipped
  • If -DskipDockerTests is not set: tests fail with a clear error message

Example usage:


@QuarkusTest
@RequiresDocker
public class MyDockerTest {
    // Tests that require Docker or Podman
}