[PR #279] [CLOSED] build: smaller container image #360

Closed
opened 2026-02-15 20:15:15 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/pipelines/pull/279
Author: @hegerdes
Created: 9/29/2024
Status: Closed

Base: mainHead: smaller-container-image


📝 Commits (1)

  • e75a97d build: smaller container image

📊 Changes

2 files changed (+15 additions, -9 deletions)

View changed files

📝 .dockerignore (+4 -1)
📝 Dockerfile (+11 -8)

📄 Description

What changed

This PR uses multi-stage builds to reduce the container image size.

The container build file now copies all installed (and possibly compiled) dependencies to the final layer without keeping the build tools.

Not included in the final image are

  • gcc build-essential curl git
  • build-caches manpages
  • .git .github Dockerfile

Uncompressed size difference: 4.37GB vs 3.79GB. A reduction of 600MB that dont have to be stored and transfered over the network anymore.

Tests

Ich created a file based diff after each image layer and compared the changed files. All changed files that are needed are still copied over to the final image.

I stated the image build with and without the USE_CUDA_DOCKER. The resulting image started with no problem


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/pipelines/pull/279 **Author:** [@hegerdes](https://github.com/hegerdes) **Created:** 9/29/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `smaller-container-image` --- ### 📝 Commits (1) - [`e75a97d`](https://github.com/open-webui/pipelines/commit/e75a97d46f92161d7def32ff928f28d645dd56d2) build: smaller container image ### 📊 Changes **2 files changed** (+15 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `.dockerignore` (+4 -1) 📝 `Dockerfile` (+11 -8) </details> ### 📄 Description ## What changed This PR uses multi-stage builds to reduce the container image size. The container build file now copies all installed (and possibly compiled) dependencies to the final layer without keeping the build tools. Not included in the final image are * gcc build-essential curl git * build-caches manpages * .git .github Dockerfile Uncompressed size difference: `4.37GB` vs `3.79GB`. A reduction of 600MB that dont have to be stored and transfered over the network anymore. ## Tests Ich created a file based diff after each image layer and compared the changed files. All changed files that are needed are still copied over to the final image. I stated the image build with and without the `USE_CUDA_DOCKER`. The resulting image started with no problem --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 20:15:15 -05:00
yindo closed this issue 2026-02-15 20:15:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/pipelines#360