I'm trying to extract the list of packages from skopeo inspect output, but this does not seem to work:
❯ skopeo inspect docker://ghcr.io/ublue-os/bluefin-dx:gts | jq '.Labels."dev.hhd.rechunk.info".packages'
The above works without the ".packages" part and the content is:
❯ skopeo inspect docker://ghcr.io/ublue-os/bluefin-dx:gts | jq '.Labels."dev.hhd.rechunk.info"'
"{\"version\": 2, \"uniq\": \"gts-40.20250305\", \"packages\": {\"libgcc\": \"14.2.1-3.fc40\", .....
How can I ask jq to go into this object and extract just the "packages" part?
I'm trying to extract the list of packages from skopeo inspect output, but this does not seem to work:
❯ skopeo inspect docker://ghcr.io/ublue-os/bluefin-dx:gts | jq '.Labels."dev.hhd.rechunk.info".packages'
The above works without the ".packages" part and the content is:
❯ skopeo inspect docker://ghcr.io/ublue-os/bluefin-dx:gts | jq '.Labels."dev.hhd.rechunk.info"'
"{\"version\": 2, \"uniq\": \"gts-40.20250305\", \"packages\": {\"libgcc\": \"14.2.1-3.fc40\", .....
How can I ask jq to go into this object and extract just the "packages" part?
Share Improve this question asked Mar 8 at 10:19 AlexandrosAlexandros 2,2491 gold badge21 silver badges32 bronze badges1 Answer
Reset to default 1Use fromjson
to parse json text:
$ skopeo inspect docker://ghcr.io/ublue-os/bluefin-dx:gts | jq '.Labels."dev.hhd.rechunk.info" | fromjson.packages'
{
"libgcc": "14.2.1-3.fc40"
}
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744898546a4599840.html
评论列表(0条)