Hello list,
I am trying to implement image squashing using the docker engine golang bindings. I am doing this to get rid of any sensitive data that may reside in the intermediate layers as part of the build process. I had earlier tried the docker-squash utility, which seems be broken since the introduction content addressable layer, hence I am rolling out my own using the go api client. My workflow is:
- Save image using SaveImage api call
- Import image using ImportImage, pass on additional metadata via changed parameter (such as CMD & WORKDIR)
After the successful import I can see that the new image exist and has the expected metadata using inspect, but the resultant image still fails to run, with docker daemon saying "Container command '/bin/sh' not found or does not exist"
At this point I am not sure whats missing, or what I am doing is just silly, I have went through a handful of issue threads, and the PR comments that implements "changes" parameter in import, and I think this should work,
any pointers will be very helpful, including calling it if this is a bad approach,
Relevant github issues:
thanks in advance
ranjib