Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • H heptapod-docker
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • heptapod
  • heptapod-docker
  • Issues
  • #9

Closed
Open
Created May 16, 2020 by Georges Racinet@gracinet🦑Owner

Reduce the size of the layer for the Rails application

With the work done in !12 (merged) and a few follow-ups, the size of our main image is about 300MB on top of the base GitLab image.

The bulk of that improvement is #5 (closed): loading the Rails application from a pre-generated tarball instead of making it a full repository. But the corresponding layer (for Dockerfile ADD command) weighs 137MB whereas our diff from GitLab 12.3.9 to Heptapod 0.13.0rc1 is about 300K only. That means it should be possible to gain another 130MB with little effort.

Some ideas:

  1. Have the Dockerfile ADD be smarter and not touch unchanged files (could be just a matter of metadata)
  2. Instead of a full tarball, generate a diff and apply it with patch during the build
  3. Pre-generate a "delta tarball", with only those files that actually differ between GitLab upstream and Heptapod

Note that at some point in the future, we'll rebuild everything from the base OS image (currently Ubuntu 16.04) or from new "cloud native" GitLab images. This could happen in a few months, and that will make current optimization efforts obsolete, Gaining 130MB with at most a few hours of work seems right in that perspective.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking