There are two ways to do that:

1. Mappings. Map classes and globals into the namespace you're querying from. This would work if there's no global/class collisions of course.

2. Custom queries. Here's an article on the topic. And here's an example.

3. Just set $namespace before running your query. Works only if you need to query one other namespace at a time. Example.

Article idea: Building IRIS images with Docker Build Mounts

From the docs on Docker Build Mounts:

RUN --mount allows you to create mounts that process running as part of the build can access. This can be used to bind files from other part of the build without copying, accessing build secrets or ssh-agent sockets, or creating cache locations to speed up your build.

This is a recent Docker feature allowing users to build compact images (since we no longer need to COPY everything inside). Try it out and write an article about it?