Cant run docker-compose on windows 10

Hi All

this is the yml file that I use :

version: '3.5'
services:

  mvntestpaybox:
    container_name: mvn-test-paybox
    environment:
      SUITE: ${SUITE}
    build:
      context: .
      dockerfile: Dockerfile

when I run the docker compose command on windows 10 I get the following error :

C:\Users\user\Desktop\AdiDemo> SUITE=payboxRunner.xml docker-compose -f docker-compose-mobilerun-daily.yml up --force-recreate

SUITE=payboxRunner.xml : The term ‘SUITE=payboxRunner.xml’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1

  • SUITE=payboxRunner.xml docker-compose -f docker-compose-mobilerun-dai …
  •   + CategoryInfo          : ObjectNotFound: (SUITE=payboxRunner.xml:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

when I run the same command on a mac it runs without any issues . what causes this issue in windows 10 ?

The way you pass in the variable SUITE requires a sh, bash, zh shell. That’s why it works on Mac (and also on any Linux), but not in Windows Powershell.

You might want to try if it works in a gitbash shell.

Other options are to configure this as an environment in your compose file and/or use an env-file (docker-compose --env-file filename-of-your-env-file -f docker-compose .... ).

Thank you very much !!! :slight_smile: