Recovering layers of a container
Examples described herein provide a computer-implemented method that includes downloading a container image from an image repository. The method further includes deploying the container image as a container at a local graph. The method further includes identifying an image layer of the container image of the container as having a patch in error. The method further includes performing at least one of recovering and rebasing the image layer having the patch in error without redeploying the container image at the local graph or restarting a service running the container.
1 . A computer-implemented method comprising:
downloading a container image from an image repository;
deploying the container image as a container at a local graph;
identifying an image layer of the container image of the container as having a patch in error; and
performing at least one of recovering and rebasing the image layer having the patch in error without redeploying the container image at the local graph or restarting a service running the container or the container,
wherein rebasing the image layer comprises relocating a difference property for the image layer having the patch in error to a diff-rebase folder within a diff-relocation storage level, the diff-relation storage level comprising the diff-rebase folder and a diff-removal folder for managing layer versions and masking erroneous layers.
2 . The computer-implemented method of claim 1 , wherein recovering the image layer comprises masking the image layer having the patch in error.
3 . The computer-implemented method of claim 1 , wherein rebasing the image layer comprises restoring an original version of the image layer having the patch in error.
4 . The computer-implemented method of claim 1 , wherein recovering the image layer comprises relocating the difference property for the image layer having the patch in error to the diff-removal folder, which causes the image layer having the patch in error to be masked.
5 . The computer-implemented method of claim 1 , wherein the recovering is performed responsive to receiving a docker recovery layer command.
6 . The computer-implemented method of claim 1 , wherein the rebasing is performed responsive to receiving a docker rebase layer command.
7 . A system comprising:
a memory comprising computer readable instructions; and
a processing device for executing the computer readable instructions, the computer readable instructions controlling the processing device to perform operations comprising:
downloading a container image from an image repository;
deploying the container image as a container at a local graph;
identifying an image layer of the container image of the container as having a patch in error; and
performing at least one of recovering and rebasing the image layer having the patch in error without redeploying the container image at the local graph or restarting a service running the container or the container,
wherein rebasing the image layer comprises relocating a difference property for the image layer having the patch in error to a diff-rebase folder within a diff-relocation storage level, the diff-relation storage level comprising the diff-rebase folder and a diff-removal folder for managing layer versions and masking erroneous layers.
8 . The system of claim 7 , wherein recovering the image layer comprises masking the image layer having the patch in error.
9 . The system of claim 7 , wherein rebasing the image layer comprises restoring an original version of the image layer having the patch in error.
10 . The system of claim 7 , wherein recovering the image layer comprises relocating the difference property for the image layer having the patch in error to the diff-removal folder, which causes the image layer having the patch in error to be masked.
11 . The system of claim 7 , wherein the recovering is performed responsive to receiving a docker recovery layer command.
12 . The system of claim 7 , wherein the rebasing is performed responsive to receiving a docker rebase layer command.
13 . A computer program product comprising:
a set of one or more computer-readable storage media;
program instructions, collectively stored in the set of one or more storage media, for causing a processor set to perform the following computer operations:
downloading a container image from an image repository;
deploying the container image as a container at a local graph;
identifying an image layer of the container image of the container as having a patch in error; and
performing at least one of recovering and rebasing the image layer having the patch in error without redeploying the container image at the local graph or restarting a service running the container or the container,
wherein rebasing the image layer comprises relocating a difference property for the image layer having the patch in error to a diff-rebase folder within a diff-relocation storage level, the diff-relation storage level comprising the diff-rebase folder and a diff-removal folder for managing layer versions and masking erroneous layers.
14 . The computer program product of claim 13 , wherein recovering the image layer comprises masking the image layer having the patch in error.
15 . The computer program product of claim 13 , wherein rebasing the image layer comprises restoring an original version of the image layer having the patch in error.
16 . The computer program product of claim 13 , wherein recovering the image layer comprises relocating the difference property for the image layer having the patch in error to the diff-removal folder, which causes the image layer having the patch in error to be masked.
17 . The computer program product of claim 13 , wherein the recovering is performed responsive to receiving a docker recovery layer command.