4

I'm reading the book Docker in action, which is a really great book so far, but I think I'm stuck now on a command which doesn't work

$> docker run –it --rm --link cass1:cass cassandra:2.2 cqlsh cass

It should run an interactive shell (cqlsh) on the cassandra database, but when I run this I get the following error:

repository name component must match "[a-z0-9](?:-*[a-z0-9])*(?:[._][a-z0-9](?:-*[a-z0-9])*)*"

Any suggestions why this doesn't work ?

Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333
  • Which version of docker are you running? `docker info` – xeor Nov 23 '15 at 11:49
  • 2
    Can you try to enter the command manually as it is written? There might be a hidden character in your command that your shell is not showing. – xeor Nov 23 '15 at 11:53
  • Yes, thats it, Thanks. When I copy-past it from the book, it doesn't work, but when I type it over it work!! – Jeanluca Scaljeri Nov 23 '15 at 13:18

1 Answers1

1

The single cassandra example mentions this docker run command after

Launch a server called cass1:

Make sure you have a cass1 container up and running before trying a --link cass1:cass, or the last "cass" argument would reference nothing.


Regarding the command-line error, this is very similar to minus vs. hyphen minus error: both characters looks the same in monospaced font, but the minus would not be correctly interpreted by a shell..

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250