Skip to content

Docker-compose in Docker for e2e testing #125

Open
@mmckeon16

Description

@mmckeon16

I am using this library to run browser tests in a dockerized environment. This works well, but I have another scenario when the browser tests themselves need to run in a dockerized environment during an end to end test. This was working when my team was using spawn from react-dev-utils/crossSpawn to run docker-compose, but we are trying to switch to this library so we do not have to manage it.
When any docker-compose command is called from the dockerized environment with this library, the process fails with:

err:  Error: spawn docker-compose ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:470:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn docker-compose',
  path: 'docker-compose',

no matter which command is run.

I have made a repo here that exemplifies this problem, with and without the working version using crossSpawn from react-dev-utils.

Not sure if I am missing some config, or if it is another issue, but I would appreciate any and all help resolving this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions