Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build msquic in a separate docker stage #1064

Merged
merged 6 commits into from
May 20, 2024

Conversation

jkoritzinsky
Copy link
Member

This allows us to avoid leaking anything from the msquic build into the alpine image, promotes better caching while iterating on docker images, and provides better clarity.

It also means that we don't need to carefully remove files/packages that are only needed for the msquic build.

Copy link
Member

@rzikm rzikm left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@jkoritzinsky jkoritzinsky merged commit cfc6557 into dotnet:main May 20, 2024
29 checks passed
@jkoritzinsky jkoritzinsky deleted the multi-stage-msquic branch May 20, 2024 15:41
@wfurt
Copy link
Member

wfurt commented May 21, 2024

The change seems to miss

cp artifacts/bin/linux/x64_Release_openssl3/libmsquic.so.* artifacts/bin/linux/x64_Release_openssl3/libmsquic.lttng.so.* /usr/lib && \
     rm -rf /tmp/msquic && \

Not sure if that was intentional but unless we install the libraries to standard location or unless we modify library search packages and tests will not be able to find it.
And I see no point of leaving the build tree behind, we really just need the .so files.

ManickaP added a commit that referenced this pull request May 21, 2024
jkoritzinsky added a commit to jkoritzinsky/dotnet-buildtools-prereqs-docker that referenced this pull request May 21, 2024
@jkoritzinsky
Copy link
Member Author

Yes, this change intentionally uses msquic's install layout directly instead of manually doing the install ourselves. The cmake --install --prefix /msquic and COPY --from=msquic /msquic / install the msquic binaries into the standard layout under /msquic and then copy them between the layers into the standard Linux layout, laying them out exactly how the msquic build intends.

@jkoritzinsky
Copy link
Member Author

By using separate stages, we do leave the build tree behind. It doesn't get copied into the second stage.

The whole point of using two stages is that we get isolation between them, so we don't need to manually delete files or uninstall packages to get back to the "before we tried to build msquic" state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants