This post was most recently updated on February 16th, 2023.2 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. This time about any docker commands failing (no matter what command and with what arguments!)
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. see 'docker run --help'
And I suspect you might, you might get the same “invalid reference format” error with any Docker commands! That means running docker pull , docker run, docker push or any other command might return the same, annoying and unspecific error; invalid reference format.
… 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 😂
- How to manually install Windows updates? - November 28, 2023
- How to restore an old version of a Trello card? - November 21, 2023
- How to fix winget when it’s throwing a “0x8a15000f : Data required by the source is missing”? - November 14, 2023