Is there a way to builder windows server docker image with custom scratch space size?

gulshan khatri 1 Reputation point
2020-05-14T11:39:30.327+00:00

I'm using server image https://hub.docker.com/_/microsoft-windows-servercore and I see that it comes by default with 20GB scratch space. I am hoping to customize the image by changing the default scratch space.

I already went through How to get past the 20gb limit? but passing --storage-opt option to docker run command or hanging the daemon.json is not an option for me as I am trying to use Windows servers as pods from Kubernetes and pod ephermal-storage limit adheres to default 20GB default container scratch space.

I have 2 questions:

  1. Is it possible to build a custom Microsoft server image with more scratch space?
  2. Is it possible to pass the docker run option --storage-opt to Kubernetes pod manifest as an argument?

Any help is much appreciated.

Thanks,

Gulshan

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,001 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 17,875 Reputation points
    2023-08-27T02:52:34.3066667+00:00

    Modifying the default scratch space in the official Microsoft Windows Server Core image might require significant modifications to the image itself. This could involve changes to how the image filesystem is structured, which may not be a straightforward task. It's also worth noting that modifying the base layers of an official image like Windows Server Core might result in image inconsistencies, compatibility issues, and difficulties in updating the image.

    0 comments No comments