-
View Files in Docker Image
brew install dive dive grycap/cowsay:latest
Find the folder of interest from dive (you can use control-M to hide modified files, control-R to hide removed files, control-B to hide file attribites, so that you only see files added to the docker image). See commands here
- Download files from the docker image
Once you know which file you want to download e.g. /usr/share/nginx/html.
brew install crane
mkdir /tmp/extracted_html
crane export grycap/cowsay:latest - | tar -xvf - -C /tmp/extracted_html usr/share/nginx/html
In this case, the contents of /usr/share/nginx/html will be copied to /tmp/extracted_html on the host machine. Note, you need to exclude the root / when specifying the path in the docker image.