I'd like to use docker as tool to compile (ningx) modules for multiple architectures (x86-64 and ARM).
I got my Dockerfile working and it's building each multi-arch image ok but I can't figure out hot to extract (copy) the compiled libraries out of each docker image without actually running the containers and since I can't run the arm image on my local laptop I'm stuck.
Does anyone have a simple/clever way of doing it?
Thanks in advance
You can export content from an image directly in the build command, telling docker to output to a filesystem instead of outputting to an image:
Then build with:
Which would create an
out/app.The other options include pulling files directly out of the image tar blobs, or doing a
docker createanddocker cpto copy files out of your image. To pull files directly out of the blob, you would need to know which layer contains the files, and then pull that blob, extracting through tar: