Skip to content

Dockerfiles leave unnecessary caches and build dependencies #615

@Kinsue

Description

@Kinsue

The Dockerfiles for Debian, Ubuntu, and RedHat images currently leave several unnecessary artifacts inside the final image. These artifacts increase the final image size and can be safely removed during the build process.

Debian / Ubuntu

  • Based on Docker's layered filesystem, cross-layer deletion cannot release any physical disk space and should be avoided.
  • Recursive permission operations on files trigger a copy-up (docker build with chmod make image bigger than without chmod docker/for-linux#964). This operation copies all files involved in the permission changes to a new layer.
  • Package manager cache files exist in the image and can be optimized.

RedHat

  • DNF cache databases and unnecessary documentation exist in the 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