Source From Here
Question
Newbie question: if I've managed to make an image with 127 layers (I know, bad form), is there a way to flatten it?
It seems like most solutions require making a container as the first step, but since I'm already at 127 layers in my image, I can't do that. When I try to I get an error ""Error response from daemon: Cannot create container with more than 127 parents"
How-To
You can flatten an image with docker export and then docker import. That will take all the existing layers and export them as a single file system image, in a tarball. Then import will bring it back in again as an image.
Steps:
Question
Newbie question: if I've managed to make an image with 127 layers (I know, bad form), is there a way to flatten it?
It seems like most solutions require making a container as the first step, but since I'm already at 127 layers in my image, I can't do that. When I try to I get an error ""Error response from daemon: Cannot create container with more than 127 parents"
How-To
You can flatten an image with docker export and then docker import. That will take all the existing layers and export them as a single file system image, in a tarball. Then import will bring it back in again as an image.
Steps:
沒有留言:
張貼留言