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

slim down the final container image #36

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

lpmi-13
Copy link
Contributor

@lpmi-13 lpmi-13 commented Sep 8, 2024

we can update the multi-stage build to output a final compile target that has the runtime, as well as run it in a base image that only includes the runtime dependencies. This takes the final image from 232MB to 79MB.

docker images | grep -i hux
huxley-runtime                                                       latest                                     327af2243b68   7 minutes ago    77.8MB
huxley                                                               latest                                     3b93cf09e9c3   19 hours ago     232MB

@lpmi-13
Copy link
Contributor Author

lpmi-13 commented Sep 8, 2024

we could also update the first base image to be

FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build-env

...and that would probably speed up the build, but wouldn't result in a smaller final image.

@jpsingleton jpsingleton self-requested a review September 9, 2024 10:26
Copy link
Owner

@jpsingleton jpsingleton left a comment

Choose a reason for hiding this comment

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

Thanks. 👍

@jpsingleton jpsingleton merged commit 38e4b9e into jpsingleton:master Sep 9, 2024
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.

2 participants