Docker Community Forums

Share and learn in the Docker community.

Docker docs - Get started Part 7: invalid reference format

Trying to run our App with MySQL with the specified command copied from the manual in (section ‘Running our App with MySQL’, step 1):

~ sudo docker run -dp 3000:3000 \ -w /app -v “(pwd):/app” \ --network todo-app \ -e MYSQL_HOST=mysql \ -e MYSQL_USER=root \ -e MYSQL_PASSWORD=secret \ -e MYSQL_DB=todos \ node:12-alpine \ sh -c “yarn install && yarn run dev”

I get this error:

docker: invalid reference format.
See ‘docker run --help’.

I run docker in ubuntu 18.04
My docker version is 20.10.1 (both client and server).

Could someone give my an indication for resolution?

Typed in command instead of copying it. Then it worked.