Docker-OSX
Docker-OSX copied to clipboard
How to build new image from already built images?
Hi @sickcodes, I have a use case for CI/CD where I want to install few packages along with the bare mac OS docker image for monterey. I followed the steps below to build the custom image file and then start it as part of naked container to get it up and running.
- Installed monterey
- Installed required packages
- Committed the docker container.
- Got the img file from the /var/lib/docker path
- Built the docker osx naked image and was able to run it successfully.
Considering that new packages may be required to be added to the existing image, how do we go about doing that? Is the only way to store the original docker image and keep building on top of it ? I have observed that for every brew install package, the docker image size increases significantly from 40GB to 80GB which is very difficult to maintain.
Could you please help me with this ? Thanks