https://docs.docker.com/engine/reference/commandline/inspect/
The above url is for official document for docker inspect including some examples.
Thanks for requesting this page! Do you want to have a go yourself?
Pages are best created by people who understand the command they are about.
If you do, take a quick read of CONTRIBUTING.md, which guides you through the process of creating a new page here. Then, just simply send a pull request to this repository - and if you need any assistance, just ask :-)
Thanks for your reply! I'll try to send the pull request soon.
I find a problems during writing examples in markdown.
For example, I wrote a command like this.
docker inspect --format='{{.Config.Image}}' {{container_name}}
Here, I need only {{container_name}} is processed as a descriptive token, but {{.Config.Image}} was converted too.
How can I include {{ and }} in examples?
Hey there! Wow, that's an edge-case there - I don't think we've ever encountered that before. I'm not aware of the underlying implementation here. Does escaping one of the opening curly braces { with a backslash (i.e. \{) work? Alternatively, could you use a space in between the 2 opening and closing curly braces at all?
/cc @agnivade @owenvoke @mebeim
I guess escaping the characters with backslash should work, although... Because it's not standard Markdown I'm not sure. 馃 I'm pretty sure most of the clients just look for the starting and ending curly braces, and may ignore the backslashes.
Yeah, I'm not sure I've seen this situation before. Perhaps using 4 lots of curly braces would cancel it out, no idea... I should be able to take a look later.
Ah I see. @progrunner17 - which client were you using? Does \{ work?
Thank you for your advice!!
Originally, I used tealdeer, a client implemented in rust and encountered the trouble.
With the client, backslashes seemed ignored and additional curly braces didn't work.
For instance, {{ {{foo bar}} }} was converted into underlined {{ foo bar.
When I try node.js client, however, additional curly braces work well.
(e.g. {{{{foo bar}}}} was converted into underlined {{foo bar}})
I suppose each clients need modification to escape backslashes.
Therefore, I suppose we should suspend this issue till the feature is officially supported, though I'm not sure you work on it.
Yeah, perhaps escaping needs to be part of the spec. @sbrl?
Hrm, wow yeah. I think we need to update the spec document for this - though I'm unsure as to where it would go, as the client spec doesn't contain information about the style of pages IIRC.
Perhaps the style guide would be a good place to start? Though again I'm unsure about bloating it too much.
Thoughts?
I don't think this is about the style of the pages, just as the token syntax isn't considered a style, but more of a standard to conform to. In the same vein, I think escaping logic should be defined in the spec so that clients can implement it.
But I'm fine if you prefer it to be in the style guide. Up to you.
Thanks for reporting this. In theory, clients should be able to do a simple matching of open/closed brackets and only consider the outermost couple of double curly brackets. No fancy code should be needed for that, but yeah, as @sbrl points out we should make sure to specify this edge case in the doc.
Looks like there's a page for docker inspect now.
Thanks!
Most helpful comment
Thanks for your reply! I'll try to send the pull request soon.