Sleeper's build and deployment scripts have a small set of hooks for users whose environments need to substitute the default build inputs. This page lists every such hook in one place: what it does, and a worked example.
None of these are needed for a default build.
Overrides the directory used as the Docker build context for the Sleeper base image. By default the base image is built from scripts/docker/base. Pass a different directory containing your own Dockerfile to substitute a custom base image.
The override only applies to local builds — it cannot be combined with --image-location repository.
Example — setDeployConfig.sh (persists the override in scripts/templates/deployConfig.json, so it is picked up by deployNew.sh and deployExisting.sh):
./scripts/deploy/setDeployConfig.sh \
--image-location localBuild \
--override-base-image-dir /path/to/my/baseExample — publishDocker.sh (override at publish time only; saved config is not consulted):
./scripts/dev/publishDocker.sh my.registry.com/path true /path/to/my/baseSee publishing artefacts for the full publish flow.
The Rust components are built inside Docker containers via rust/build-in-docker.sh, with the builder images themselves produced by rust/builders/buildAll.sh (or buildAllSccache.sh). The hooks below affect either the building of those builder images or how the Rust workload runs inside them.
Override the upstream servers used by rustup when installing the Rust toolchain into the builder images.
Example:
export RUSTUP_DIST_SERVER=https://rustup.internal.example.com
export RUSTUP_UPDATE_ROOT=https://rustup.internal.example.com/rustup
./rust/builders/buildAll.shEither variable can be set independently. If both are unset, the builder images are built against the public rustup servers.
Appends arbitrary TOML to the cargo config used for the current Rust build, without modifying the checked-in rust/.cargo/config.toml. The value must be valid TOML; multi-line values are supported via \n escapes.
Use this to point cargo at an internal crates.io mirror, configure a private registry, set source replacement rules, or any other per-environment cargo setting that should not be committed.
Example — replace the default crates.io source with an internal mirror:
export EXTRA_CARGO_CONFIG='[source.crates-io]\nreplace-with = "internal-mirror"\n\n[source.internal-mirror]\nregistry = "https://crates.internal.example.com/index"'
./rust/build-in-docker.sh x86_64When set to any non-empty value, rust/build-in-docker.sh does not run docker pull against the builder image before running the build. The build still uses whatever image is locally tagged.
Useful when you have built the builder image locally and do not want it overwritten by a pull, or when the public registry is unreachable and the image has been loaded by some other means.
Example:
./rust/builders/buildAll.sh # builds and tags the image locally
export SKIP_DOCKER_PULL=true
./rust/build-in-docker.sh x86_64 # uses the local image, no pullDrop PEM-encoded CA certificate files into the certs/ directory at the repository root if the Rust builder image needs to trust a private certificate authority. Any file extension may be used — .crt, .pem, .cer, etc.
Files placed here (other than the placeholder README.md) are picked up by rust/builders/buildAll.sh and rust/builders/buildAllSccache.sh and installed as trusted CA certificates inside the builder container. Nothing is installed on the host.
If certs/ only contains the placeholder README.md, the builder images are built without any custom CA trust changes.
Example:
cp my-corporate-root-ca.crt certs/
./rust/builders/buildAll.sh