Open tomeichlersmith opened 7 months ago
We can pretty-print json via python -m json.tool
which is (hopefully) available on most systems. I'm worried about calling out to python though, so I will print the raw JSON if python
is not available.
apptainer pretty-prints the JSON with a few extra levels of depth, but the labels are still there and it is still json
apptainer inspect --json <image>
we can select the labels with docker inspect
but its JSON is just a single-line stream, so we need another tool to pretty-print it
docker inspect --format '{{json .Config.Labels}}' ldmx/dev:latest | python3 -m json.tool
Is your feature request related to a problem? Please describe. It is helpful when using the image as an environment to do some mild introspection.
Describe the solution you'd like Something like
denv config print --image
or whatever that calls the necessarydocker inspect --format ....
andapptainer inspect ...
commands.Describe alternatives you've considered An alternative is just to document it, but I think this is a simple enough task that it can be done across the current four runners. I'll probably have it be an optional feature of the runners so that future runners don't have too many requirements outside of download images and actually running them.