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

Optimize size and rebuild behavior of OCI image #25

Open
amotl opened this issue Oct 17, 2023 · 1 comment
Open

Optimize size and rebuild behavior of OCI image #25

amotl opened this issue Oct 17, 2023 · 1 comment

Comments

@amotl
Copy link
Contributor

amotl commented Oct 17, 2023

Optimize image size

Each command creates a layer in the docker image that contains the changes to the previous layer.
All files are still left in the previous layer and space is saved in the image.
To fix this, run apt install, pip install, and apt remove in a single RUN command so that files are not kept in hidden layers.

Originally posted by @intermittentnrg in #24 (comment)

Optimize rebuild behavior

Currently, pip install is copying all python files from /src to elsewhere so it now needs to run and will install dependencies when any .py/application file is changed. Changes in Python should not re-run pip etc., only if setup.py (or README.rst) were changed.

Originally posted by @intermittentnrg in #24 (comment) and #24 (comment)

@amotl amotl mentioned this issue Oct 17, 2023
2 tasks
@amotl amotl changed the title Optimize size of OCI image Optimize size and rebuild behavior of OCI image Oct 17, 2023
@amotl
Copy link
Contributor Author

amotl commented Oct 19, 2023

Dear @intermittentnrg,

thank you for your attention to detail. I am currently travelling, but I will be happy to address those topics on the next iteration in one way or another.

With kind regards,
Andreas.

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

No branches or pull requests

1 participant