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 gimie container size #95

Open
3 tasks
supermaxiste opened this issue Oct 20, 2023 · 0 comments
Open
3 tasks

Optimize gimie container size #95

supermaxiste opened this issue Oct 20, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@supermaxiste
Copy link
Member

Currently the gimie container for x86 stands at ~815MB divided as follows (docker history command):

Layer                                           size
RUN /bin/sh -c useradd -ms /bin/bash gimie_u…   332kB     
COPY .docker/entrypoint.sh /entrypoint.sh # …   215B      
COPY /app /app # buildkit                       582MB     
RUN /bin/sh -c set -eux;   savedAptMark="$(a…   12.2MB    
RUN /bin/sh -c set -eux;  for src in idle3 p…   32B       
RUN /bin/sh -c set -eux;   savedAptMark="$(a…   29.6MB    
ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8…   0B
RUN /bin/sh -c set -eux;  apt-get update;  a…   3.12MB
/bin/sh -c #(nop) ADD file:cb13581b8e7a9de43…   80.6MB   

Ideas on how to reduce size:

  • Copy only gimie folder and accompanying python venv instead of the whole /app folder (check if other dependencies are needed), see example
  • Re-order layers to have Poetry install dependencies first, and then copy gimie. This improves Docker layer caching (see this post, section 4)
  • Remove dev dependencies from installation since they're not necessary to execute gimie (poetry install --without dev arg)

Other ideas are welcome :)

@supermaxiste supermaxiste added the enhancement New feature or request label Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant