{"id":20148267,"url":"https://github.com/chainguard-dev/nginx-image-demo","last_synced_at":"2025-05-06T21:34:31.038Z","repository":{"id":41301698,"uuid":"478878372","full_name":"chainguard-dev/nginx-image-demo","owner":"chainguard-dev","description":"nginx image demo","archived":true,"fork":false,"pushed_at":"2023-09-11T23:53:42.000Z","size":29,"stargazers_count":19,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-22T00:05:28.046Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chainguard-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-07T07:42:35.000Z","updated_at":"2025-01-12T03:58:29.000Z","dependencies_parsed_at":"2022-08-28T07:11:18.071Z","dependency_job_id":null,"html_url":"https://github.com/chainguard-dev/nginx-image-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fnginx-image-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fnginx-image-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fnginx-image-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fnginx-image-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chainguard-dev","download_url":"https://codeload.github.com/chainguard-dev/nginx-image-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252772902,"owners_count":21802011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T22:36:30.129Z","updated_at":"2025-05-06T21:34:30.695Z","avatar_url":"https://github.com/chainguard-dev.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# nginx-image-demo\n\nThis is a demonstration of how [cosign][cs], [apko][apko] and [Melange][mel]\ncan be combined to build an image with a custom application payload.  It uses\na set of GitHub Actions published in the Chainguard [actions][actions] repository.\n\n   [cs]: https://github.com/sigstore/cosign\n   [apko]: https://github.com/chainguard-dev/apko\n   [mel]: https://github.com/chainguard-dev/melange\n   [actions]: https://github.com/chainguard-dev/actions\n\n## The lifecycle of an application build\n\n### Packaging\n\nFirst, the relevant packages to support an application are built with Melange!\nIn this case, we are using nginx as an example (a stripped down version of the\nnginx ingress packaging, which builds a few dozen dependencies).\n\nYou can see an example of this in the `.melange.yaml` file.\n\n### Image composition and publish\n\nNext, the image is composed and published with `apko`.  Melange stores its packages\nin a local repository, which is consumed by `apko`.  These packages are combined\nwith dependencies from the upstream Alpine Linux distribution, composed into an\nOCI image, and published.  An SBOM is generated and published along side the\nimage if `apko` 0.3 or newer is used.\n\nApko configures an s6 service bundle and arranges for it to be launched when a\ncontainer is started.  This is similar to using `s6-overlay` with Docker, and is\nconsidered a best practice so that zombie processes get reaped.\n\n### Image signing\n\nFinally, the image is signed using Cosign.  You can see the `.github/workflows/push.yaml`\nfile for the details on how this works.\n\nAll of this is done in a declarative (and reproducible) way.  Since it is declarative\nand reproducible, refreshing the image can be automated.  See the [distroless][dl]\nGitHub project for some examples of how this can be done.\n\n   [dl]: https://github.com/distroless\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainguard-dev%2Fnginx-image-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainguard-dev%2Fnginx-image-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainguard-dev%2Fnginx-image-demo/lists"}