Docker in Sandboxes (Alpha)
Modal has Alpha support for running docker containers inside modal.Sandbox.
This is intended to support coding agents who want to interact with development environments that include
container images.
This functionality is enabled by creating Sandboxes with experimental_options={"enable_docker": True}.
Demo
Run the following program with the Image Builder version set to version 2025.06 or later.
MODAL_IMAGE_BUILDER_VERSION=2025.06 python3 demo.py
The output will be like this: