Docker "-v " is not recognized as an internal or external command

318 views Asked by At

I am trying to trigger Neoload Test through Azure Devops Pipeline, below is what I have tried so far

  1. Added "Docker CLI installer" task to the pipeline
  2. Added command line task with below code
docker run --rm \
     -v "https://sample.azure.com/sample/Team%20-%20NFT/_git/Team%20-%20NFT ":Neoload_POC.nlp \
     -e SCENARIO_NAME=scenario1 \
     -e NEOLOADWEB_TOKEN=1PNvUSm4uzWewmCQwo1S \
     -e TEST_NAME=Neoload_POC \
     -e CONTROLLER_ZONE_ID=lg01.sample.com:7100  \
     -e LG_ZONE_IDS=<lg01.sample.com:7100>:<1>  \

Docker installer successful ran and installed docker, but command line task returning with below error

docker: invalid reference format.
See 'docker run --help'.
'-v' is not recognized as an internal or external command,
operable program or batch file.
'-e' is not recognized as an internal or external command,
operable program or batch file.

Any help is really appreciated

1

There are 1 answers

4
axiac On

The problem is on the line

-e LG_ZONE_IDS=<lg01.sample.com:7100>:<1>

For the shell, < and > are the redirection symbols. They need to be enclosed in quotes or apostrophes to not be interpreted as redirections.

Because of the last >, the rest of the line is not part of the docker command and this is why docker complains.

That part of the command should read:

-e LG_ZONE_IDS='<lg01.sample.com:7100>:<1>'

or

-e 'LG_ZONE_IDS=<lg01.sample.com:7100>:<1>'

Also, the docker command is not complete. It misses the name of the image to be used to create the container.
I suppose that you didn't paste the entire command line in the question.