Skip to content

Reduce Docker image size #269

@ngosang

Description

@ngosang

Wallabag Docker image size uncompressed is 574 MB
According to dive the image can be reduced at least in 100 MB.

I have some ideas but I'm not expert in php/composer:

  • Why do you install Python and Python libraries? It takes ~188MB
  • Remove /root/composer/ I think this is the composer cache ~43 MB
  • Remove .git folder (repository history) in the final image. I think it will be wise to remove all but the php source code and config.
  • Is it possible to uninstall composer and other dependencies after the installation is complete? (I think you only need php, php-libs and nginx)
  • Vendor folder is ~104MB. Are all dependencies required?

Update: If you don't agree, another alternative is to publish 2 images (with different tags). I think the slim image could be 1/3 the size of the current image with the same features (redis). Some of us are running Wallabag in RaspberryPi with low resources. :)

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