Skip to content

wp-env - Improve Docker status message and docs #51218

@igorradovanov

Description

@igorradovanov

What problem does this address?

The current documentation and wp-env npm package displays the error message "Could not connect to Docker. Is it running?" even when Docker is running and all troubleshooting steps have been followed. However, this error can also occur when the Docker Compose plugin is not installed or it's not in the path. Since Docker Compose is not included with Docker by default, this can confuse users who repeatedly troubleshoot the Docker daemon without realizing that the issue lies with the missing docker-compose. I have attached screenshots from Visual Studio Code and Terminal for additional context.

What is your proposed solution?

The proposed solution is for the npm package to provide a more verbose error message and check whether the problem lies with the Docker daemon itself or if Docker Compose plugin is missing. Additionally, the documentation should be updated to advise users to check if docker-compose is installed on their system and provide instructions on how to install it if it is not.

Changes proposed for next line:

execSync( 'docker info', { stdio: 'ignore' } );

Screenshot from 2023-06-04 14-30-22

Metadata

Metadata

Assignees

No one assigned

    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