Closed jsm174 closed 2 years ago
We usually only add target-platform-specific additions to editor
image. These changes should be made in the base image instead (images/ubuntu/base/Dockerfile
).
Could you please give an indication of how much space is used by the base image before and after?
We usually only add target-platform-specific additions to
editor
image. These changes should be made in the base image instead (images/ubuntu/base/Dockerfile
).Could you please give an indication of how much space is used by the base image before and after?
Thanks. I was going to do base and then I wasn't sure. Reverted the change, and updated accordingly.
As for size, it looks like it's 24mb.
docker images -a unityci/base:ubuntu-latest
REPOSITORY TAG IMAGE ID CREATED SIZE
unityci/base ubuntu-latest 841ddfea6757 2 weeks ago 474MB
docker images -a jsm174/unityci_base:ubuntu-latest
REPOSITORY TAG IMAGE ID CREATED SIZE
jsm174/unityci_base ubuntu-latest 2b196435d7a1 9 minutes ago 498MB
I feel like more could be cleaned up, but I must be missing something. I added software-properties-common
just to get add-apt-repository
and then I remove it after installation.
After using dive, it seems like most of the size is in the /var/cache/lib/apt/lists
directory:
@webbertakken - I was looking at the editor docker file, and noticed all
apt-get clean
are followed by rm -rf /var/lib/apt/lists/*
If we do that here,
docker images -a jsm174/unityci_base:ubuntu-latest
REPOSITORY TAG IMAGE ID CREATED SIZE
jsm174/unityci_base ubuntu-latest c1e5176d1603 6 seconds ago 479MB
The change is ~4MB. We could that for the first block as well and reduce the size of the image as well?
Could you please give an indication of how much space is used by the base image before and after?
474MB before, 396MB after. 78MB reduction
Could you please give an indication of how much space is used by the base image before and after?
474MB before, 396MB after. 78MB reduction
It's a bit unclear to me how much the size is affected by each change, with both changes in the same MR. Would you mind applying the suggestion your suggestion in a separate PR:
apt-get clean
are followed byrm -rf /var/lib/apt/lists/*
If you could make a screenshot both before and after of the total size of the base image it will be easier to compare (per layer stats aren't very useful).
Then we can rebase this PR and again see the difference of total image size before and after.
Sure. Ahh, you were right, only a decrease of about 27mb.
Context
Tried the changes locally to make a more exact comparison of base
image.
before
is the current version on main
.without-lists
same as before but with the apt-get lists removed in first 2 RUN
instructionswithout-lists-upgrade-lib
same as before but with the lib upgradedProof
Conclusion
Upgrading the lib in this MR increases size by 4 megs, which is acceptable, as it allows (experimental) unity packages to work out of the box.
Changes
com.autodesk.fbx@4.1
requireslibstdc++ 6.0.28+
(see https://docs.unity3d.com/Packages/com.autodesk.fbx@4.1/manual/index.html)Unfortunately the version of
libstdc++
that comes with Ubuntu 18 is6.0.25
. Until the base images are updated to use Ubuntu 20 (which has a much newer version), we need to install an updatelibstdc++
.I was able to make a docker image:
This was tested at:
https://github.com/freezy/VisualPinball.Engine/pull/387#issuecomment-1066182772
Checklist