Skip to content

Reduce size of docker image #4924

Closed

Description

@SchrodingersGat

InvenTree docker image is quite large, and could probably be reduced significantly in size.

But, requires someone to look at it closely...

Activity

  1. added
    help wanted
    docker
    setup
    on May 30, 2023
  2. wolflu05 commented on Jun 3, 2023

    @wolflu05
    Member

    Analyzed the image. Looks like we have lots of unnecessary dependencies for runtime which we could remove or use multi stage build to copy only the needed files.

    image

    Is there any reason why we don't use alpine images, they are a lot smaller?

  3. SchrodingersGat commented on Jun 3, 2023

    @SchrodingersGat
    MemberAuthor

    We were previously using alpine, but moved away from it to use the current base image.

    IIRC there were some dependencies in the alpine image which broke InvenTree for a while so we switched over. Also some articles I read at the time seemed to indicate that alpine was not the best choice - ref #3029

    Regarding multi-stage builds - this looks like a good idea. Do you want to take a look at this?

  4. SchrodingersGat commented on Jun 5, 2023

    @SchrodingersGat
    MemberAuthor

    @wolflu05 did you want to take a crack at this one?

  5. wolflu05 commented on Jun 5, 2023

    @wolflu05
    Member

    Sorry forgot to answer here. Yeah, I can try it, but don't expect any activity in the next weeks, won't have time for it. So if anybody else want to tackle this, go ahead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dockerhelp wantedsetup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions