Docker run: invalid reference format error

Viewed 9022

I am trying to install and run azure cognitive-services Computer Vision Read containers.I am getting this error in cmd

docker: invalid reference format.
See 'docker run --help'.

I tried to run below cmd

docker run --rm -it -p 5000:5000 --memory 7g --cpus 2 \
containerpreview.azurecr.io/microsoft/cognitive-services-read \
Eula=accept \
Billing=xxxx \
ApiKey=xxxx

Note: i have replaced Billing and ApiKey details for security reason.

Thanks in advance for any help !

2 Answers

It's clear to see when you separate the docker run into several lines in cmd, it cannot cognize it. So I recommend you don't separate the command, just let it in one line. Or you can do it in PowerShell and change the \ like this:

enter image description here

Keep in mind that different shells have different syntax.

  • For sh/bash-like shell, multiline escape char is \.
  • For powershell, use `.
  • For cmd, it is probably ^.
Related