{"id":20148253,"url":"https://github.com/chainguard-dev/images-autodocs","last_synced_at":"2025-05-06T21:34:30.880Z","repository":{"id":193508338,"uuid":"687971935","full_name":"chainguard-dev/images-autodocs","owner":"chainguard-dev","description":"This project is now retired :wave:","archived":true,"fork":false,"pushed_at":"2024-07-03T18:13:00.000Z","size":486,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-17T15:58:32.004Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","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":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-06T11:45:50.000Z","updated_at":"2024-07-15T12:41:39.000Z","dependencies_parsed_at":"2023-09-08T13:57:35.359Z","dependency_job_id":"c9361fa6-cb2c-40d9-9e17-4fd190638c2a","html_url":"https://github.com/chainguard-dev/images-autodocs","commit_stats":null,"previous_names":["chainguard-dev/images-autodocs"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fimages-autodocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fimages-autodocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fimages-autodocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fimages-autodocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chainguard-dev","download_url":"https://codeload.github.com/chainguard-dev/images-autodocs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252772899,"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:11.523Z","updated_at":"2025-05-06T21:34:30.393Z","avatar_url":"https://github.com/chainguard-dev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Autobots Autodocs](workdir/autod.png)\n# Images Autodocs\n[![Build Chainguard Images Reference Docs](https://github.com/chainguard-dev/images-autodocs/actions/workflows/autodocs-images.yaml/badge.svg)](https://github.com/chainguard-dev/images-autodocs/actions/workflows/autodocs-images.yaml)\n\nThis repository contains automation pipelines to generate the [reference documentation for Chainguard Images(https://edu.chainguard.dev/chainguard/chainguard-images/reference/) in [Chainguard Academy](https://edu.chainguard.dev).\n\n## GitHub Action\nThis application runs as a GitHub Action workflow, but can also be executed in a local environment as long as you prepare data sources accordingly.\n\n### Customizing Action\nThe following environment variables should be used to customize how and where docs are built:\n\n- `AUTODOCS_SOURCES` - directories where image sources (with READMEs) can be found. Multiple directories can be defined using a `:` as separator. Default: `./workdir/sources/images/images`.\n- `AUTODOCS_OUTPUT` - directory where generated docs will be saved. Default: `./workdir/output`.\n- `AUTODOCS_CACHE` - directory where cache files can be found. Default: `./workdir/cache`.\n- `AUTODOCS_IMAGES_CACHE` - file where information about images and tags are saved. Default: `images-list.json`.\n- `AUTODOCS_TEMPLATES` - directory where to find docs templates. Default to `./templates`.\n- `AUTODOCS_IGNORE_IMAGES` - list of images to **not** build docs for. These will be skipped at build time. Image names should be listed as a string using `:` as separator.\n- `AUTODOCS_CHANGELOG` - source directory to compare with new builds in order to generate a changelog. Typically, the same as `AUTODOCS_OUTPUT`.\n- `AUTODOCS_CHANGELOG_FILE` - path to markdown file where to keep the changelog.\n\n## Running Autodocs Locally\n\nBefore running autodocs locally, you'll need to prepare the data sources necessary to build the documentation. These include:\n\n- Repository with Image source files: required to pull in image README files.\n- JSON data feeds: these contain important information about images, tags history, installed packages, and more.\n\n### 1. Preparing the Repository Sources\nStart by cloning the image source repositories into the workdir:\n\n```shell\ncd workdir/sources\ngit clone git@github.com:chainguard-images/images.git\n```\nMultiple sources can be used, but they need to be specified in the `config/autodocs.php` configuration file (or as an environment variable). The path `workdir/sources/images` is added by default.\n\n### 2. Preparing the JSON Data sources\n\nThe `bin` folder has two shell scripts that should be executed in order to save the data in the application's cache dir. You'll need to be authenticated with chainctl to run the scripts.\n\nStart by authenticating with `chainctl`:\n\n```shell\nchainctl auth login chainctl auth login --identity [IDENTITY]\n```\n\nThen, fetch the list of images and tags. You'll need to provide the `IMAGES_GROUP` variable with a valid group to fetch the full list of images and their tags.\n\n```shell\nIMAGES_GROUP=[IMAGES_GROUP] ./bin/getImages.sh\n```\nOnce you have the `images-tags.json` file containing all images and tags, you can run the second script to pull in all metadata from `latest-*` image variants. This data is required to generate the image variants pages. This script takes a while to complete (approximately 20 minutes). \n\n```shell\n./bin/getVariants.sh\n```\nWhen finished, you should have the cache dir (workdir/cache) populated with JSON files, one for each image+variant.\n\n### 3. Building the Docker Image\n\nWith all files in place, you can now build the included Docker image to run autodocs:\n\n```shell\ndocker build . -t autodocs-images\n```\n\n### 4. Generating Docs\nYou can now generate image docs with:\n\n```shell\ndocker run --rm -v ./workdir:/app/workdir autodocs-images build images\n```\nThis will output all docs to `workdir/output` . Each image should have 4 pages:\n\n```shell\nworkdir/output/php\n├── image_specs.md\n├── overview.md\n├── provenance_info.md\n└── tags_history.md\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainguard-dev%2Fimages-autodocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainguard-dev%2Fimages-autodocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainguard-dev%2Fimages-autodocs/lists"}