Documentation
¶
Overview ¶
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- func CreateMounts(fsExePath string, originalLayers []image.OriginalLayer, ...) []mount.Mount
- func ExportImg(imgName string, workDir string, overlayPath string, dockerRootDir string, ...) (bool, string, []image.ShadowLayer)
- func ExtractLayersInfo(imgInfo *types.ImageInspect, overlayPath string, dockerRootDir string) []image.LayerInfo
- func LoadImage(imgTarPath string, cli *client.Client)
- func ShadowImage(imgName string, workDir string, overlayPath string, dockerRootDir string, ...) (bool, []image.OriginalLayer, []image.ShadowLayer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMounts ¶
func CreateMounts(fsExePath string, originalLayers []image.OriginalLayer, shadowLayers []image.ShadowLayer) []mount.Mount
CreateMounts creates mounts for each layer. It does not create anything on the filesystem.
func ExportImg ¶
func ExportImg(imgName string, workDir string, overlayPath string, dockerRootDir string, cli *client.Client, ctx *context.Context, topN int) (bool, string, []image.ShadowLayer)
ExportImg exports the debloated image to a tar file. It returns if exported, target tar path, shadow layers.
func ExtractLayersInfo ¶
func ExtractLayersInfo(imgInfo *types.ImageInspect, overlayPath string, dockerRootDir string) []image.LayerInfo
ExtractLayersInfo extracts layer info from image inspect, from top to bottom. It returns a list of layer info.
func ShadowImage ¶
func ShadowImage(imgName string, workDir string, overlayPath string, dockerRootDir string, cli *client.Client, ctx *context.Context, optimize string) (bool, []image.OriginalLayer, []image.ShadowLayer)
ShadowImage shadows the image. For each original layer, it creates a shadow layer in memory. It does not create anything on the filesystem. It returns if shadowed, original layers, shadow layers.
Types ¶
This section is empty.