@Test
    public void testThatAuthLocatorIsUsedForDockerComposePull() throws IOException {
        // Prepare a simple temporary Docker Compose manifest which requires our custom private image
        Path tempFile = getLocalTempFile(".docker-compose.yml");
        @Language("yaml")
        String composeFileContent =
            "version: '2.0'\n" +
            "services:\n" +
            "  privateservice:\n" +
            "      command: /bin/sh -c 'sleep 60'\n" +
            "      image: " +
            testImageName.asCanonicalNameString();
        Files.write(tempFile, composeFileContent.getBytes());

        // Start the docker compose project, which will require an authenticated pull
        try (final DockerComposeContainer<?> compose = new DockerComposeContainer<>(tempFile.toFile())) {
            compose.start();

            assertThat(
                compose.getContainerByServiceName("privateservice_1").map(ContainerState::isRunning).orElse(false)
            )
                .as("container started following an authenticated pull")
                .isTrue();
        }
    }
Containerised docker image registry, with simple hardcoded credentials
core/src/test/java/org/testcontainers/utility/AuthenticatedImagePullTest.java