Giter Club home page Giter Club logo

Comments (6)

schultzp2020 avatar schultzp2020 commented on May 26, 2024

Currently, the majority of the dockerfile build time is allocated to running the fix-permissions script. Is there a way we could cut down the time required to run this script? @sabre1041 @tumido

from backstage-showcase.

tumido avatar tumido commented on May 26, 2024

@schultzp2020 I think you can make the Dockerfile to use the fix-permissions script earlier in multiple layers instead of just as the last one. What that would result into is incremental changes - container layers work in a way that they store all that is changed compared to the previous layer. So, if the fix-permissions was already executed for some files, it means the permissions don't have to be updated for them again + these files are already cached in their final state in previous layers. This should potentially (and counterintuitively) result in smaller and faster builds.

from backstage-showcase.

schultzp2020 avatar schultzp2020 commented on May 26, 2024

@tumido I have yet to try it; however, I do not believe that will work because the last (prod) stage doesn't copy files directly from the build stage. Instead the build stage creates tarballs, which are then extracted during the prod stage. Therefore, the majority of the files are not from previous stages that would benefit from running fix-permissions in an earlier stage.

from backstage-showcase.

tumido avatar tumido commented on May 26, 2024

I think tarball preserves permissions, doesn't it? Let's try it and if it doesn't work we can try to come up with something else... 🙂

from backstage-showcase.

Zaperex avatar Zaperex commented on May 26, 2024

End users will no longer be building their own backstage showcase images, so this issue is mainly for improving our own build times for showcase and RHDH.

Currently I have only identified optimizations for the first stage (dependency installations) by only copying package.json files rather than the entire repository.

from backstage-showcase.

schultzp2020 avatar schultzp2020 commented on May 26, 2024

There are no optimizations we can do for the dockerfile since the fix-permissions script takes the most amount of time and we do not control the script.

from backstage-showcase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.