Docker is the unfortunate future

Solving “invalid reference format.” when trying to run “docker whatever”

This post was most recently updated on April 28th, 2022.

< 1 min read.

So another simple one. (I just seem to run into all of the issues whenever I try to do the simplest thing with Docker!)

Or with anything, I guess – but yeah, that’s another article then!


Table of Contents

I was trying to run a Docker container called Syslog-ng, and had to add quite a few parameters in order to map the volumes and ports that I needed. Any time that I would run it, I’d get a really non-descript error message.

This is what I ran:

docker run -it -v "/c/[path not important]/Syslog/syslog-ng.conf:/etc/syslog-ng/syslog-ng.conf" -v "/c/[path not important]/Syslog/logs:/var/log" -p 514:514 -p 601:601 –name syslog-ng balabit/syslog-ng:latest -edv

And this is what I got in return:

docker: invalid reference format.

What do?


… This was incredibly annoying, but the whole thing was just an issue with Docker not understanding my hyphens, and confusing them with dashes. If you’re like me, and you’re often copy-pasting stuff first from the internet to your text editor on Windows, and then from there to a WSL console or anywhere over an RDP connection, you’ll end up with these encoding/charset related issues from time to time.


I rewrote each hyphen. That fixed it, but as usual, YMMV – maybe you’ll need to rewrite your forward/backward slashes and colons, too.

(Between you and me, I think that one hyphen before “name” looks a bit suspicious!

As usual, I hope this helps 😂

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments