ckan / ckan/ckan-docker-base

Improve Image Size

Open
#131 0 comments 0 reactions 1 assignee View on GitHub

@kowh-ai is already working on this.

Since Jun 29, 2025.

Dominant language
Shell
Stars
35
Forks
42
PR merge metrics
No merged PRs in 30d

Description

I recommend to apply some optimizations to reduce image size.

  • combine all RUN commands into a single RUN command to reduce overlayfs layers to speed up I/O (example)
  • remove unused packages (are linux headers or g++ really used after image creation?)
  • clean temporary folders (e.g. apt clean)

Another optimization might be to create a separate builder stage, build everything there and copy only the results into a new python image - but that may take some more time to implement.

Further best practices may be found here:
https://docs.docker.com/build/building/best-practices/#choose-the-right-base-image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.