• hi,

    currently I try to setup wordpress + db + wordpress-cli with a docker-compose.yaml

    I found this:

    –ssh=[<scheme>:][<user>@]<host\|container>[:<port>][<path>] Perform operation against a remote server over SSH (or a container using scheme of “docker”, “docker-compose”, “vagrant”).

    on

    https://developer.ww.wp.xz.cn/cli/commands/core/install/

    but when im using “docker-compose” as scheme, I get:
    wordpress-cli_1 | sh: docker-compose: not found

    Heres an excerpt from the command section of my wordpress-cli container:

    
    [...]
    wordpress-cli:
        depends_on:
          - db
          - wordpress
        image: wordpress:cli
        user: xfs
        command: >
          /bin/sh -c '
          sleep 30;
          wp core install --ssh="docker-compose:wordpress:8080" --path="/var/www/html" --url="http://localhost:8080" --title="Local WordPress By Docker" 
    [...]
    

    there is also a container namend wordpress with port 80 mapped to 8080:

    
    [...]
      wordpress:
        depends_on:
          - db
        image: wordpress:latest
        restart: always
        volumes:
          - ./wp-content:/var/www/html/wp-content
        ports:
          - 8080:80
    [...]
    

    Whats meant with scheme? I’m not sure if understand the parameter section correctly, moreover my docker-compose knowledge is not the best :/.

    Thanks for help in advance :).

    • This topic was modified 6 years, 11 months ago by bahoop.

The topic ‘WordPress CLI: Globale parameters –SSH sh: docker-compose: not f’ is closed to new replies.