Skip to content

minimal image is too big (5.43GB) — investigation and potential improvements #123

@Robinlovelace

Description

@Robinlovelace

Problem

The minimal image is currently 5.43GB, which is only slightly smaller than:

  • latest (5.70GB)
  • osgeo (6.07GB)
  • suggests (5.67GB)

This undermines its purpose as a lightweight alternative. By comparison:

  • python is 2.32GB
  • pythonr is 4.37GB

Potential next steps

  1. Audit the minimal Dockerfile to identify unnecessary layers, duplicate packages, or base-image bloat inherited from rocker/geospatial.
  2. Compare with python (2.32GB) to see what Python-enabled images are doing differently to stay small.
  3. Investigate whether rocker/geospatial itself is larger than necessary and whether we can:
    • Use a smaller base image (e.g., Debian slim or Ubuntu minimal).
    • Prune existing layers in the base image or use multi-stage builds.
  4. Leverage rocker-versioned2 build scripts to let users mix and match components (R, Python, QGIS, etc.) rather than shipping a monolithic minimal image. Example reference: https://github.com/rocker-org/rocker-versioned2/blob/master/scripts/install_rstudio.sh
  5. Document how advanced users can replicate the minimal setup using the rocker-versioned2 scripts and a smaller base image of their choice.

Proposed short-term fix

Open a PR with a reduced minimal image that removes non-essential packages and explores smaller base-image options, while keeping the geospatial stack functional.


/cc @Robinlovelace @deargle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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