build-image
build-image copied to clipboard
Make this repo more accurately reflect Netlify builds
According to https://github.com/netlify/build-image/issues/118#issuecomment-364566072,
The only piece that happens "outside that" is the initial git clone which creates the repository directory and happens using the deploy key that is installed in your repository settings. That looks like this:
git clone <your project> ; cd <project checkout> && git submodule update -f --init
That's not quite correct, as README.md#build-environment-variables states:
Your local buildbot emulator doesn't have access to build environment variables set in the Netlify UI or netlify.toml file.
I propose:
- Move the
git submoduleoperation somewhere more visible; - Stop overwriting
/usr/local/bin/buildand/usr/local/bin/run-build-functions.shin the docker image with the build scripts. This would only be useful for testing (in my case, replacing the clone command). Instead, leave the scripts there, and document how to add locally-changed versions for local debugging; - Parse netlify.toml in the local docker build as you do in production; or support .env files and document their usage.