Giter Site home page Giter Site logo

[ci/cd] Optimize docker build about locokit HOT 1 OPEN

mdartic avatar mdartic commented on June 12, 2024
[ci/cd] Optimize docker build

from locokit.

Comments (1)

mdartic avatar mdartic commented on June 12, 2024

So, after discussion with @kiorky, I try several things :

  • parallelization with matrix on platforms
    • an issue appears, with the build & push github action, the latest build is pushed and overwrite all previously images
    • a better idea of this could be the use of docker manifest to create a multi-arch manifest (https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/) AFTER all platforms are built
    • this could also help us if we want to test all built images (particularly arm32 ones)
    • the last step of the workflow could be the push of the tag with the multi-arch manifest
  • set the cache-from / cache-to
    • I don't see any improvements on build time
    • I let them for now and check if there is some benefits
  • move the docker build job in the api-quality workflow to reuse build artifacts
    • this is the main shift, as it cut off the build time from one hour to ~6mn
    • and this, without the use of matrix as it breaks the push of multi-arch images

Initial time:

https://github.com/locokit/locokit/actions/runs/5923472268

Image

After use of parallelization with matrix on platforms:

https://github.com/locokit/locokit/actions/runs/5965675095

Image

After shifting docker build in the api quality workflow:

with parallelization (and issue when pushing tag to hub.docker.com)

https://github.com/locokit/locokit/actions/runs/5966002861

Image

without parallelization (and no issue on push)

https://github.com/locokit/locokit/actions/runs/5966049744

Image

For now, we'll stay on what is in the PR, so :

  • shift of the docker build in the api quality workflow
  • reuse of build artifacts for docker build
  • no matrix / parallelization by platform

from locokit.

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.