I want to push an image from my local machine to a remote private Docker registry, but I need to do it as part of a Gatling perf test (using Scala), it means, using the Docker API, I've found some documentation on how to compose the request, but I didn't find anything regarding how to get the layers in Mac Os because in this OS the layers are not actual files (as they are for Linux) but are part of a big "Docker.raw" file.
Any ideas/tools on how to get the layers to be able to put them as part of the PUT requests?
EDIT:
Finally, I was able to overcome this problem by saving the image and then uncompressing it, the layers are under some "hash folders". Part of the script that does it contains the next:
docker image save $imageName -o exported.tar
tar xzf exported.tar -C folderToSeeLayers
The layers are in .tar format