{"id":13480721,"url":"https://github.com/CircleCI-Public/cimg-base","last_synced_at":"2025-03-27T11:30:48.154Z","repository":{"id":37800124,"uuid":"178469545","full_name":"CircleCI-Public/cimg-base","owner":"CircleCI-Public","description":"The CircleCI Base (Ubuntu) Docker Convenience Image.","archived":false,"fork":false,"pushed_at":"2024-07-22T20:34:20.000Z","size":265,"stargazers_count":75,"open_issues_count":2,"forks_count":44,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-03-27T00:22:04.466Z","etag":null,"topics":["cimg","circleci","circleci-cimg","convenience-image","docker"],"latest_commit_sha":null,"homepage":"https://circleci.com/developer/images/image/cimg/base","language":"Dockerfile","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/CircleCI-Public.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-29T20:10:23.000Z","updated_at":"2025-02-03T11:25:11.000Z","dependencies_parsed_at":"2023-02-19T12:01:14.577Z","dependency_job_id":"99710d26-f068-4b71-8c15-bdd2d9299453","html_url":"https://github.com/CircleCI-Public/cimg-base","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CircleCI-Public%2Fcimg-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CircleCI-Public%2Fcimg-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CircleCI-Public%2Fcimg-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CircleCI-Public%2Fcimg-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CircleCI-Public","download_url":"https://codeload.github.com/CircleCI-Public/cimg-base/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245835908,"owners_count":20680291,"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":["cimg","circleci","circleci-cimg","convenience-image","docker"],"created_at":"2024-07-31T17:00:44.140Z","updated_at":"2025-03-27T11:30:47.848Z","avatar_url":"https://github.com/CircleCI-Public.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\t\u003cp\u003e\n\t\t\u003cimg alt=\"CircleCI Logo\" src=\"https://raw.github.com/CircleCI-Public/cimg-base/main/img/circle-circleci.svg?sanitize=true\" width=\"75\" /\u003e\n\t\t\u003cimg alt=\"Docker Logo\" src=\"https://raw.github.com/CircleCI-Public/cimg-base/main/img/circle-docker.svg?sanitize=true\" width=\"75\" /\u003e\n\t\t\u003cimg alt=\"Ubuntu Logo\" src=\"https://raw.github.com/CircleCI-Public/cimg-base/main/img/circle-ubuntu.svg?sanitize=true\" width=\"75\" /\u003e\n\t\u003c/p\u003e\n\t\u003ch1\u003eCircleCI Convenience Images =\u003e Base\u003c/h1\u003e\n\t\u003ch3\u003eA Continous Integration focused Ubuntu Docker image built to run on CircleCI\u003c/h3\u003e\n\u003c/div\u003e\n\n[![CircleCI Build Status](https://circleci.com/gh/CircleCI-Public/cimg-base.svg?style=shield)](https://circleci.com/gh/CircleCI-Public/cimg-base) [![Software License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/CircleCI-Public/cimg-base/main/LICENSE) [![Docker Pulls](https://img.shields.io/docker/pulls/cimg/base)](https://hub.docker.com/r/cimg/base) [![CircleCI Community](https://img.shields.io/badge/community-CircleCI%20Discuss-343434.svg)](https://discuss.circleci.com/c/ecosystem/circleci-images) [![Repository](https://img.shields.io/badge/github-README-brightgreen)](https://github.com/CircleCI-Public/cimg-base)\n\n[![InsightsSnapshot](https://dl.circleci.com/insights-snapshot/gh/CircleCI-Public/cimg-base/main/main/badge.svg)](https://app.circleci.com/insights/github/CircleCI-Public/cimg-base/workflows/main?branch=main)\n\n`cimg/base` is an Ubuntu Docker image created by CircleCI with continuous integration builds in mind.\nAs its name suggests, this image is designed to serve as a base image for other CircleCI Convenience Images (images prefixed with `cimg/`).\n\nThis image is also very useful for CircleCI users to use as a base for their own custom Docker images.\n\nThis image contains the minimum tools required to operate a build on CircleCI (such as `git`) as well as extremely popular and useful tools in CircleCI (such as `docker`).\n\n## Support Policy\n\nThe CircleCI Docker Convenience Image support policy can be found on the [CircleCI docs](https://circleci.com/docs/convenience-images-support-policy) site. This policy outlines the release, update, and deprecation policy for CircleCI Docker Convenience Images.\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n- [How This Image Works](#how-this-image-works)\n- [Development](#development)\n- [Contributing](#contributing)\n- [Additional Resources](#additional-resources)\n- [License](#license)\n\n## Getting Started\n\nThis image can be used with the CircleCI `docker` executor.\nFor example:\n\n```yaml\njobs:\n  build:\n    docker:\n      - image: cimg/base:2022.09\n    steps:\n      - checkout\n      # Whatever you want to do\n      - run: sudo apt-get update \u0026\u0026 sudo apt-get install -y figlet\n      - run: figlet Continuous Integration Rocks!\n```\n\nIn the above example, the CircleCI Base Docker image is used for the primary container.\nMore specifically, the tag `2022.09` indicates the dated version of the base image.\nSee how tags work below for more information.\n\n## How This Image Works\n\nThis image contains the Ubuntu Linux operating system and everything needed to run most builds on CircleCI.\nThis includes but is not limited to:\n\n- Git\n- Docker and Docker Compose\n- Dockerize\n- The `build-essential` package containing compiling tools\n- jq\n- curl, ssh, and much more\n\n### Tagging Scheme\n\nThis image has the following tagging scheme:\n\n```\ncimg/base:edge[-version]\ncimg/base:current[-version]\ncimg/base:\u003cYYYY.MM\u003e[-version]\n```\n\n`edge` - This image tag points to the latest version of the Base image.\nThis tag is built from the `HEAD` of the `main` branch.\nThe `edge` tag is intended to be used as a testing version of the image with the most recent changes however not guaranteed to be all that stable\nSoftware an be added for test that might actually be removed before the next monthly snapshot..\nThis tag is not recommended for production software.\n\n`current` - This image tag points to the most recent monthly snapshot.\nThis image should be used by projects that want a decent level of stability but would like to get occasional software updates.\nIt is typically updated once a month.\nWhile not often, this tag can introduce breaking changes.\n\n`\u003cYYYY.MM\u003e` - This image tag is a monthly snapshot of the image, referred to by the 4 digit year, dot, and a 2 digit month.\nFor example `2022.01` would be the monthly snapshot tag from January 2022.\nThis tag is intended for projects that are highly sensitive to changes and want the most deterministic builds possible.\nUnless absolutely necessary (for security for example), no breaking changes will be introduced as we don't rebuild a monthly snapshot.\n\n`-version` - This is an optional extension to the tag to specify the version of Ubuntu to use.\nThere can be up to two options, the current LTS and the previous LTS.\nAs of this writing, those options would be `20.04`, or `22.04`.\nWhen leaving the version out, suggested, the default version will be used.\nThe default Ubuntu version is the newest LTS version, after it has been out for 4 months.\nFor example, Ubuntu 20.04 came out in April 2020, so it became the default version for this image in August 2020.\nThe previous LTS version will be supported for a year after it drops out of the default slot.\n\n## Development\n\nImages can be built and run locally with this repository.\nThis has the following requirements:\n\n- local machine of Linux (Ubuntu tested) or macOS\n- modern version of Bash (v4+)\n- modern version of Docker Engine (v20.10+)\n\n### Cloning For Community Users (no write access to this repository)\n\nFork this repository on GitHub.\nWhen you get your clone URL, you'll want to add `--recurse-submodules` to the clone command in order to populate the Git submodule contained in this repo.\nIt would look something like this:\n\n```bash\ngit clone --recurse-submodules \u003cmy-clone-url\u003e\n```\n\nIf you missed this step and already cloned, you can just run `git submodule update --recursive` to populate the submodule.\nThen you can optionally add this repo as an upstream to your own:\n\n```bash\ngit remote add upstream https://github.com/CircleCI-Public/cimg-base.git\n```\n\n### Cloning For Maintainers ( you have write access to this repository)\n\nClone the project with the following command so that you populate the submodule:\n\n```bash\ngit clone --recurse-submodules git@github.com:CircleCI-Public/cimg-base.git\n```\n\n### Generating Dockerfiles\n\nThe Dockerfile in the Ubuntu version directory (i.e. `20.04/`) is already in a state to be built if you want to build a new version of this image.\nRunning `docker build` in this directory will be enough.\n\nChanges to this image should occur in the `Dockerfile.template` file and then using the `gen-dockerfiles.sh` script, a new Dockerfile will be built.\nFor example, you would run the following from the root of the repo:\n\n```bash\n./shared/gen-dockerfiles.sh 20.04 22.04\n```\n\nThe generated Dockerfile will be located at `./20.04/Dockefile` and `./22.04/Dockerfile`.\nTo build the first image locally and try it out, you can run the following:\n\n```bash\ncd 20.04\ndocker build -t test/base:20.04 .\ndocker run -it test/base:20.04 bash\n```\n\nWhile CircleCI will only be publishing LTS versions of Ubuntu (such as 20.04 or 22.04), you are free to swap out the version number with something newer for your own personal use.\n\n### Building the Dockerfiles\n\nTo build the Docker images locally as this repository does, run the `build-images.sh` script:\n\n```bash\n./build-images.sh\n```\n\nThis script needs to be run after generating the Dockerfiles first.\nWhen releasing proper images for CircleCI, this script is run from a CircleCI pipeline and not locally.\n\n### Publishing Official Images (for Maintainers only)\n\nThe individual scripts (above) can be used to create the correct files for an image, and then added to a new git branch, committed, etc.\n`stage` and `edge` releases are completely automated as in the monthly snapshots.\nThe release script is included to make this process easier for LTS updates.\nTo make an updated LTS release for this image, you would run the following from the repo root:\n\n```bash\n./shared/release.sh 20.04\n```\n\nThis will automatically create a new Git branch, generate the Dockerfile(s), stage the changes, commit them, and push them to GitHub.\nAll that would need to be done after that is:\n\n- wait for build to pass on CircleCI\n- review the PR\n- merge the PR\n\nThe main branch build will then publish a release.\n`edge` will be updated immediately with the LTS change occurring during the next monthly release.\n\n### Incorporating Changes\n\nHow changes are incorporated into this image depends on where they come from.\n\n**build scripts** - Changes within the `./shared` submodule happen in its [own repository](https://github.com/CircleCI-Public/cimg-shared).\nFor those changes to affect this image, the submodule needs to be updated.\nTypically like this:\n\n```bash\ncd shared\ngit pull\ncd ..\ngit add shared\ngit commit -m \"Updating submodule for foo.\"\n```\n\n**Base specific changes** - Editing the `Dockerfile.template` file in this repo will modify the Go image, specifically.\nDon't forget that to see any of these changes locally, the `gen-dockerfiles.sh` script will need to be run again (see above).\n\n### Fixing a Monthly Snapshot\n\nYou can respin (re-release) a monthly snapshot where there's a serious bug or security issue.\nThis can be done by tagging a commit as `monthly`.\nThis will re-create the monthly snapshot for the current month.\n\n## Contributing\n\nWe encourage [issues](https://github.com/CircleCI-Public/cimg-base/issues) and [pull requests](https://github.com/CircleCI-Public/cimg-base/pulls) against this repository.\n\nPlease check out our [contributing guide](.github/CONTRIBUTING) which outlines best practices for contributions and what you can expect from the images team at CircleCI.\n\n## Additional Resources\n\n[CircleCI Docs](https://circleci.com/docs/) - The official CircleCI Documentation website.\n[CircleCI Configuration Reference](https://circleci.com/docs/2.0/configuration-reference/#section=configuration) - From CircleCI Docs, the configuration reference page is one of the most useful pages we have.\nIt will list all of the keys and values supported in `.circleci/config.yml`.\n[Docker Docs](https://docs.docker.com/) - For simple projects this won't be needed but if you want to dive deeper into learning Docker, this is a great resource.\n\n## License\n\nThis repository is licensed under the MIT license.\nThe license can be found [here](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCircleCI-Public%2Fcimg-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCircleCI-Public%2Fcimg-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCircleCI-Public%2Fcimg-base/lists"}