Skip to content
Mattias Wadman edited this page Nov 11, 2022 · 3 revisions

snippets

Extract file from docker image

docker save repo/image | fq 'grep_by(.name=="filename").data | tobytes' > filename

List files in docker image

docker save repo/image | fq -r '[(.files[] | select(.name=="manifest.json").data[0].Layers[]) as $l | [.files[] | select(.name==$l).data.files[].name]] | add[] | tostring'
Clone this wiki locally