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

feat: reduce app image size #205

Merged
merged 9 commits into from
Nov 23, 2023
Merged

feat: reduce app image size #205

merged 9 commits into from
Nov 23, 2023

Conversation

sinopeus
Copy link
Collaborator

@sinopeus sinopeus commented Nov 20, 2023

This PR slims down the app image size considerably, by at least 400MB + more depending on the size of the .git directory. Credits to @undo76 for the ideas!

This change slims down the app image, reducing the space requirements
by about 400MB: build-essential (370MB) and poetry (30MB) don't get
included.
Copy link
Member

@lsorber lsorber left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @sinopeus! Mostly small comments, but one big one about the base image for the app and ci stages that we need to iron out first.

Co-authored-by: Laurent Sorber <laurent.sorber@gmail.com>
@sinopeus
Copy link
Collaborator Author

I tried installing the Poetry env as a non-root user, but I was relying on symlinking to /usr/bin/poetry to avoid juggling two virtualenvs, and creating that symlink of course crashes if you're not root. So I reverted that change - the discussion got lost though.

Copy link
Member

@lsorber lsorber left a comment

Choose a reason for hiding this comment

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

Another review round, we're getting closer!

{{ cookiecutter.__package_name_kebab_case }}/Dockerfile Outdated Show resolved Hide resolved
{{ cookiecutter.__package_name_kebab_case }}/Dockerfile Outdated Show resolved Hide resolved
{{ cookiecutter.__package_name_kebab_case }}/Dockerfile Outdated Show resolved Hide resolved
{{ cookiecutter.__package_name_kebab_case }}/Dockerfile Outdated Show resolved Hide resolved
{{ cookiecutter.__package_name_kebab_case }}/Dockerfile Outdated Show resolved Hide resolved
{{ cookiecutter.__package_name_kebab_case }}/Dockerfile Outdated Show resolved Hide resolved
{{ cookiecutter.__package_name_kebab_case }}/Dockerfile Outdated Show resolved Hide resolved
@lsorber lsorber merged commit eaec9e0 into main Nov 23, 2023
2 checks passed
@lsorber lsorber deleted the xga-reduce-app-image-size branch November 23, 2023 13:11
@lsorber lsorber changed the title Reduce app image size feat: reduce app image size Nov 23, 2023
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