Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Size optimizations #448

Copy link
Copy link

Description

@lubo
Issue body actions

Hi. I've come across a couple of size optimizations, which may sound interesting. By default, Alpine Linux builds packages with -Os GCC flag, which optimizes compiled binaries for size. By setting CFLAGS="-Os", I was able to reduce size of 3.8-alpine3.11 image from 112 MB to 83.9 MB (25% smaller). Also, Alpine Linux runs strip on all compiled binaries. AFAIK we can imitate that by setting LDFLAGS="-Wl,--strip-all", which strips all symbols from compiled binaries. After setting it, the image size was further reduced to 67.3 MB (40% smaller). Any thoughts?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    RequestRequest for image modification or featureRequest for image modification or feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.