Skip to content

No such file or directory error when looking for docker compose files #880

@vonjackets

Description

@vonjackets

Hey all, I'm trying to use the latest changes (as of 9aae21e) to leverage the docker compose support, but I'm having a wild error I can't figure out.

I'm trying to simply run a provided docker compose file, but I get this error constantly using even the simplest code and file tree.

It should be stated that my intel macos system is running podman version 5.4.1
instead of docker (with docker compatibility enabled) but I haven't had much trouble getting regular containers to run using the library, so I can't be sure what the problem could be? I intend to dig further, but I'd appreciate any feedback.

Compose

services:
  neo4j:
    user: 7474:7474
    image: neo4j:5.26.2
    restart: never
    environment:
      - NEO4J_AUTH=neo4j/somepassword
    ports:
      - "7474:7474"
      - "7687:7687"

file tree:

├── Cargo.lock
├── Cargo.toml
├── docker-compose.yaml
└── src
    └── main.rs
use testcontainers::compose::DockerCompose;

#[tokio::main]
async fn main() {
    let mut compose = DockerCompose::with_local_client(&["docker-compose.yml"]);
    compose.up().await.expect("expected to start");
}

error:


thread 'main' panicked at src/main.rs:6:24:
expected to start: Testcontainers(Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
                                                                                    

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions