{"id":13897987,"url":"https://github.com/netlify/build-image","last_synced_at":"2025-07-17T15:31:32.627Z","repository":{"id":30195843,"uuid":"33746671","full_name":"netlify/build-image","owner":"netlify","description":"This is the build image used for running automated builds","archived":true,"fork":false,"pushed_at":"2023-01-25T16:16:09.000Z","size":22974,"stargazers_count":495,"open_issues_count":115,"forks_count":196,"subscribers_count":28,"default_branch":"focal","last_synced_at":"2024-08-07T18:44:58.063Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/netlify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2015-04-10T19:27:00.000Z","updated_at":"2024-05-29T10:27:53.000Z","dependencies_parsed_at":"2023-02-14T09:16:55.222Z","dependency_job_id":null,"html_url":"https://github.com/netlify/build-image","commit_stats":null,"previous_names":[],"tags_count":216,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Fbuild-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Fbuild-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Fbuild-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Fbuild-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netlify","download_url":"https://codeload.github.com/netlify/build-image/tar.gz/refs/heads/focal","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226274617,"owners_count":17598850,"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-08-06T18:03:59.710Z","updated_at":"2024-11-25T04:30:29.383Z","avatar_url":"https://github.com/netlify.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Netlify Build Image\n\n\u003e ### Archive note\n\u003e\n\u003e We have archived this repository and moved the code to a private repository. This decision was made to provide shorter development cycles and allow us to react faster on issues.\n\u003e\n\u003e Sadly, this change comes with the bittersweet price of not having this repository open source anymore.\n\u003e\n\u003e We apologize for this inconvenience and still want to hear from you on issues you encounter or feature requests.\n\u003e\n\u003e To support your troubleshooting, we will still publish the `build-image` to Docker Hub for now. We would love to make troubleshooting easier for you, but first we need to understand your unique situation.\n\u003e\n\u003e Since we would love to understand the troubleshooting issues you’re encountering, we kindly ask you to reach out to our Support team in the Forums. Again, we would love to make troubleshooting easier for you, but first we need to understand your unique situation.\n\u003e\n\u003e ### How to report features and bugs?\n\u003e\n\u003e To build a better web, we still need your valuable input and feedback! Help us build a better web by reporting issues or proposing feature requests to our build system through our [Support Forum](https://answers.netlify.com/c/features/50).\n\u003e\n\u003e ### Find out which software \u0026 version is available inside your builds\n\u003e\n\u003e We updated our documentation page to reflect an accurate list of all the languages and software that is currently available in our builds.\n\u003e\n\u003e You can check it out at [our docs page](https://docs.netlify.com/configure-builds/available-software-at-build-time/).\n\nThis repository contains the tools to make the build image that Netlify's continuous deployment buildbot uses to build a site from a connected Git repository.\n\nIf you're having problems with your build, you can also use these tools to test locally.\n\n## Available images\n\nNetlify maintains multiple build images for testing new development as well as supporting legacy builds. Each image uses a different version of Ubuntu Linux, with a slightly different list of included language and software versions.\n\nThe following image is currently available:\n\n- `focal` - Default build image for all new sites; Running Ubuntu 20.04 and [this software](https://github.com/netlify/build-image/blob/focal/included_software.md)\n\nEach image name above corresponds to a branch in this repository.\n\n## Running locally\n\nEmulating Netlify's buildbot on your local machine requires the following:\n\n- [Docker](https://docs.docker.com/install/)\n- A local clone of this build-image repository\n- A local clone of the site repository you want to test, checked out to the branch you want to be built, with a clean git status (nothing to commit).\n\n### Step 1: Pull the build image\n\nOpen your Docker terminal, and run the following command to pull the default image:\n\n```\ndocker pull netlify/build:focal\nor\ndocker pull netlify/build:v3.0.2 # replace the version with a git tag of the specific version you want to test\n```\n\n### Step 2: Start the script to run interactively\n\nStill in your Docker terminal, change directories into your local clone of this build-image repository.\n\nIf you pulled an alternate image in Step 1, check out the corresponding branch in this repository.\n\nRun the following command to start the interactive shell within the container:\n\n```\n./test-tools/start-image.sh path/to/site/repo\n```\n\nIf you receive a `command not found` message, make sure you are in the base of the build-image repository.\n\nIf the command works correctly, you should see a new prompt, with the user `buildbot`.\n\n### Step 3: Have the buildbot run your build command\n\nIn the buildbot shell, run `build` followed by your site build command. For example, for a site build command of `npm run build`, you would run the following:\n\n```\n/opt/build-bin/build npm run build\n```\n\nThis will run the build as it would run on Netlify, displaying logs in your terminal as it goes. When you are done testing, you can exit the buildbot shell by typing `exit`.\n\n### Build environment variables\n\nYour local buildbot emulator doesn't have access to build environment variables set in the Netlify UI or netlify.toml file. However, you can explicitly set them in the interactive buildbot shell before running your build command.\n\nHere is an example that sets `NODE_VERSION` and `NODE_ENV` before running a build command of `npm run build`:\n\n```\nexport NODE_VERSION=8 NODE_ENV=production ; build npm run build\n```\n\n### Testing it for a mono repository\n\nIf you like to run a debugging build for your mono repository you need to pass the **Base directory** like in the Netlify UI.\n\n```\n./test-tools/test-build.sh path/to/site/repo base/directory 'your build command'\n```\n\n### Testing locally with cache\n\nIf you'd like to run a debugging build using our caching mechanisms, with verbose shell output, you can replace steps 2 and 3 above with the following command:\n\n```\n./test-tools/test-build.sh path/to/site/repo 'your build command'\n```\n\nThis will create a `tmp` directory that will have the repo that the buildbot cloned, the scripts run by the buildbot, and the cache (with hidden files). The terminal displays the path to the `tmp` directory at the start of each build. You specify this path in an environment variable prepended to the command above, like so:\n\n```\nT=tmp/tmp.XXXXX ./test-tools/test-build.sh path/to/site/repo 'your build command'\n```\n\n## Development\n\nVisit the [development section in our CONTRIBUTING.md](CONTRIBUTING.md#development)\n\n## Contributing\n\nPull requests welcome, as long as they're not overly specific to a niche use-case.\n\nPlease see our [contributing documentation](CONTRIBUTING.md).\n\n## More info\n\nHow we use this and some best practices are documented here: https://www.netlify.com/blog/2016/10/18/how-our-build-bots-build-sites/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlify%2Fbuild-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetlify%2Fbuild-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlify%2Fbuild-image/lists"}