Skip to content

ContainerLogs endpoint always returns NULL #19

@rodrigoaguilera

Description

@rodrigoaguilera

When I run

docker run --name test busybox:latest echo hello

I can see the output in the logs with

docker logs test

but running

$logs = $docker->containerLogs('test', ['stdout' => true]);

never returns anything.

I did a bit of debugging of the ContainerLogs.php class and it seems it expects the body to be JSON but the is received as a string
https://github.com/beluga-php/docker-php-api/blob/main/src/Endpoint/ContainerLogs.php#L83

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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