GithubHelp home page GithubHelp logo

nginx-image-demo's Introduction

nginx-image-demo

This is a demonstration of how cosign, apko and Melange can be combined to build an image with a custom application payload. It uses a set of GitHub Actions published in the Chainguard actions repository.

The lifecycle of an application build

Packaging

First, the relevant packages to support an application are built with Melange! In this case, we are using nginx as an example (a stripped down version of the nginx ingress packaging, which builds a few dozen dependencies).

You can see an example of this in the .melange.yaml file.

Image composition and publish

Next, the image is composed and published with apko. Melange stores its packages in a local repository, which is consumed by apko. These packages are combined with dependencies from the upstream Alpine Linux distribution, composed into an OCI image, and published. An SBOM is generated and published along side the image if apko 0.3 or newer is used.

Apko configures an s6 service bundle and arranges for it to be launched when a container is started. This is similar to using s6-overlay with Docker, and is considered a best practice so that zombie processes get reaped.

Image signing

Finally, the image is signed using Cosign. You can see the .github/workflows/push.yaml file for the details on how this works.

All of this is done in a declarative (and reproducible) way. Since it is declarative and reproducible, refreshing the image can be automated. See the distroless GitHub project for some examples of how this can be done.

nginx-image-demo's People

Contributors

kaniini avatar amouat avatar

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.