Skip to main content
Namespace Runners support using custom containers for GitHub Jobs. When a job runs inside a container, reaching Namespace resources, caches, git mirrors, and the local builder each need a small amount of extra mount and setup configuration.

Accessing Namespace resources from containers

To access Namespace resources from within a container, extra configuration is required. In particular, the directory /var/run/nsc/ must be mounted into the container, and namespacelabs/nscloud-setup needs to be run. See the following snippet for a working example of accessing Bazel:

Accessing cache volumes from containers

To access Cache volumes from within a container, additional configuration is required. For example, when using an Ubuntu-based custom image, the following snippet provides a working, minimal example:
Please see our nscloud-cache-action documentation for details.

Accessing Git mirrors from containers

If your workflow runs in a container, additional configuration is required to use cached Git Repositories:
Please see our nscloud-checkout-action documentation for details.

Using local build caching from containers

While Remote Builders provide the best performance for most scenarios, in-runner builders (locally cached) excel when building massive images (10GB+). Keeping the build local skips network transfer time. To access in-runner builders from within a container, additional configuration is required.
1

Enable local build caching

To enable this feature, just open the runner profile configuration and add a cache volume. Next, select Locally cached for your Docker builds.
2

Update your workflow

In the job step definition, you need to forward the buildkit socket and create a builder inside the container that uses the parent:

Next steps

Last modified on September 15, 2026