Skip to content

Using DockerComposeContainer with a local image does not work #674

@aruizca

Description

@aruizca

Hi there,

I am just trying out TestContainers to launch a container with Atlassian Confluence inside which I know it works when using Dokcer for Mac the usual way.

My docker-compose.yml file looks like this:

version: "3"
services:
  confluence:
    image: confluence-4-testing
    volumes:
      - "docker-maven-repo:/root/.m2"
    ports:
      - "1990:1990"
    networks:
      - confluence-test-network
    environment:
      - CONFLUENCE_VERSION

networks:
  confluence-test-network:
    driver: bridge

volumes:
  docker-maven-repo:

please not the image which is a local one and it is not available in any docker hub.

My TestContainer is declared as per the following sentence:

    @Shared
    DockerComposeContainer compose = new DockerComposeContainer(new File("docker-compose.yml"))
            .withEnv("CONFLUENCE_VERSION", "6.8.2")
            .withExposedService("confluence_1",1990)
            .withLocalCompose(true)
            .waitingFor("confluence_1", Wait.forListeningPort())

and the error I am getting is:

org.testcontainers.containers.ContainerLaunchException: Local Docker Compose exited abnormally with code 1 whilst running command: pull

IMO it should not be pulling the image remotely. As I said this work just running docker-compose run --rm --service-ports -e CONFLUENCE_VERSION=6.8.2 confluence

Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions