Pangolin Image Size #2069
Replies: 6 comments 1 reply
|
Hi! This is good work thank you. Would you be interested in opening a PR
for this and we could discuss and test there? We are extremely
interested in getting the container size down but have not had the time
to invest.
Unfortunately node_modules is a killer but something must be going wrong
for it to be this big.
Thanks!
|
|
Hello I am running pangolin on a small VPS with 10GB of disk space - i just realized today about the exploded size of pangolin and while searching I ended up here - I was wondering if anyone else had noticed it. thanks @boomam |
|
Missed the notification for this - @oschwartz10612, I'll see i can find some time over the holidays, i had some more ideas to further reduce. |
|
@oschwartz10612 - i am assuming that the latest 1.14 release has added some of the above observations, as the image size is now down to 1.3Gb? |
|
Currently, I see the size is about 1.1 GB. The bigger part is of course: Do we really need all the Node.js modules folder, including documentation, Git history, sample/test files ? I don't know if that can be applied/is relevant, but looking into this guide seems interesting: In particular, for that area, the section "Problem #2: Copying Unnecessary Files". Below is an AI analysis of this concern with possible fixesThe
1. ~254 MiB is never imported by the server. These packages are only used by the web UI, which is already compiled into 2. The Next.js compiler ships in the image. 3. The standalone output is fully duplicated. Possible fixes
|
|
Next release will make it as small as we can I think around 500mb! Closing. |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
Is it normal for the unpacked pangolin image to be so large?
For example, if i run 'docker history' against the 1.13.1 image, there's a layer over 1.13GB in size, another at 310Mb and another at 146MB -
For the larger layers -
RUN /bin/sh -c apk add --no-cache curl tzdata python3 make g++ # buildkitRUN /bin/sh -c npm ci --omit=dev && npm cache clean --force # buildkitDoing some poking around, there's some efficiencies to be had here by combining the run layers, clearing caches after various commands.
For example, unpacked, 1.13.1 is 1.71GB in size.
By adjusting the Dockerfile as such...
...reduces the image size down to 1.33GB -
To be clear, other than seeing if the container actually runs, I've not tested if Pangolin still works - so this is all theoretical, to be fair, but as a minor POC of reducing the image size, this seems to be a step in the right direction perhaps.
Is this something we can look into perhaps in the next few releases, as 1.7Gb+ sizes for images is getting a little large...
All reactions