Skip to content

Idea to optimize images #694

@GurliGebis

Description

@GurliGebis

ISSUE

Currently, every image (cm, cd, rep etc.) are created from scratch, resulting in a huge download when downloading the images.
An idea might be to use a multistage image, and then have a stage where a sitecore instance is copied into the resulting image.
Then after that, App_Config and Web.config is overwritten by the version that matches the correct Sitecore role.

If you do it this way, there will be a layer containing all the sitecore files that will only be downloaded once, and then a separate small layer for each of the roles, improving download speed, storage requirements and load on the container registry.

My idea would be like this:

1: First copy files for the CM role into the destination C:\inetpub\wwwroot in the Dockerfile
2: Then, in a separate command in the Dockerfile for all of the roles, copy the App_Config and Web.config for that role into the folder, overwriting the files from the CM instance.

By doing it this way, everything should be smaller.
From what I can see when downloading the images, there is no optimization for this (please correct me if I'm wrong, since I cannot find the sitecore assets image anywhere to inspect).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions