Skip to content

[windows][lldb] reduce Docker image size#566

Merged
shahmishal merged 1 commit into
swiftlang:mainfrom
charles-zablit:cz/lldb/windows/smaller-image
Jun 9, 2026
Merged

[windows][lldb] reduce Docker image size#566
shahmishal merged 1 commit into
swiftlang:mainfrom
charles-zablit:cz/lldb/windows/smaller-image

Conversation

@charles-zablit

Copy link
Copy Markdown
Contributor

This patch reduces the resulting image size:

  1. Switch from vs_community.exe to vs_buildtools.exe: Build Tools is headless, no IDE.
  2. --depth 1 on vcpkg clone to avoid fetching the full git history.
  3. Delete vcpkg buildtrees, packages, downloads after the libxml2 install.

Overall, this should reduce the image size from 9GB to ~1GB.

C:\\vcpkg\\bootstrap-vcpkg.bat -disableMetrics
SHELL ["cmd", "/S", "/C"]
RUN ""C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" && C:\vcpkg\vcpkg install libxml2:x64-windows"
RUN ""C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && C:\vcpkg\vcpkg install libxml2:x64-windows"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this at all? We build libxml2 from source for the toolchain, we should just do that here and avoid vcpkg entire.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could yes. I'm not able to test this at desk, so I wanted to minimize the changes to avoid any breakage.

@shahmishal shahmishal merged commit a670f23 into swiftlang:main Jun 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants