Skip to content

Alpine images too big (should use multi-staged build) #339

Open
@harmv

Description

@harmv

I noticed that the docker-postgis alpine images are far too big

eg: postgis/postgis 13-3.3-alpine a21d01173429 2 weeks ago 556MB

Cause

The Dockerfile does not use a multi-staged build.

Steps to reproduce:

Actual result

the final image contains, besides the required postgres & postgis binaries, also unneeded build stuff (g++, gcc, clang-dev, perl, autoconf, automake, etc, etc)

Expected

The final image is much smaller.
Only the required binaries are in the final image. (postgres + postgis)
The intermediate build stuff (compilers etc) are not in the final image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions