I feel there should be a better way here.
I run the following command to see the layers of an image(nginx in this case)
docker inspect nginx:latest --format "{{.RootFS.Layers}}"
And the output I get looks like this.
[sha256:f2cb0ecef392f2a630fa1205b874ab2e2aedf96de04d0b8838e4e728e28142da sha256:71f2244bc14dacf7f73128b4b89b1318f41a9421dffc008c2ba91bb6dc2716f1 sha256:55a77731ed2630d9c092258490b03be3491d5f245fe13a1c6cb4e21babfb15b7]
Of course that's an array. That looks worse in the command prompt without appropriate wrapping.
Can that be formatted better?
Tried the following variations (all that I knew) but did not help :(
docker inspect nginx:latest --format "{{json .RootFS.Layers}}" // json
docker inspect nginx:latest --format "table {{.RootFS.Layers}}" // table with double quote
docker inspect nginx:latest --format 'table {{.RootFS.Layers}}' // table with single quote