Skip to content

Conversation

@pshem
Copy link

@pshem pshem commented Mar 14, 2019

Static libraries have been removed from mysql images. This speeds up the build process and shrinks the resulting image. All credit for the idea to @wkozaczuk, based on #64 (comment)

This should shrink MySQL images by ~45 Mb:

osv$ find apps/mysql/install/ -name '*.a' -exec du -h '{}' +
39M apps/mysql/install/usr/lib/libmysqld.a
0 apps/mysql/install/usr/lib/libmysqlclient_r.a
8.0K apps/mysql/install/usr/lib/libmysqlservices.a
6.3M apps/mysql/install/usr/lib/libmysqlclient.a

Static libraries have been removed from `mysql` images. This speeds up the build process and shrinks the resulting image. All credit for the idea to @wkozaczuk, based on cloudius-systems#64 (comment)
@pshem
Copy link
Author

pshem commented Mar 14, 2019

The image with static libraries is 53Mb, without them it's 35Mb.

However, I've discovered that this patch doesn't work:

  • Running find apps/mysql/install/ -name '*.a' -exec rm '{}' + works and keeps the images shrunk until running make clean.
  • Putting find $ROOTDIR -name '*.a' -exec rm '{}' + at the end of GET doesn't. I'll update the patch when I figure it out.

@pshem pshem changed the title Don't include static libraries in mysql images [WIP] Don't include static libraries in mysql images Mar 24, 2019
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.

1 participant