Docker Flow
Run the full builder-scaffold flow inside a Docker container — no Sui CLI or Node.js required on your host. The same steps work for any extension example (smart_gate_extension, storage_unit_extension, or your own); this guide uses smart_gate_extension for the publish and scripts steps.
Tip
Prefer working on your host? See Host Flow to run with Sui CLI and Node.js installed locally.
efctl can automate
the entire Docker flow (container start, world deploy, extension publish, and script execution)
with a single command:
efctl env up
1. Prerequisites
- Docker installed
2. Clone the Repo
If you haven’t already:
3. Start the Container
On first run the container creates three funded accounts (ADMIN, PLAYER_A, PLAYER_B). Keys persist across container restarts via a Docker volume. Every start spins up a fresh local Sui node and funds the accounts from the faucet.
Inside the container you get:
For full container details (workspace layout, testnet switching, cleanup) see the Docker Environment page.
4. Switch to Testnet (Optional)
You can switch to testnet from inside the container the same way you would on your host:
5. Deploy World and Create Test Resources
Note
These manual steps (clone, deploy, configure, seed, copy artifacts) will be simplified into a single setup command in a future release. Move package dependencies will resolve automatically using MVR.
Tip
The /workspace/world-contracts/ directory is a bind mount at docker/world-contracts/ on your host, so files persist across restarts and are editable from your IDE.
6. Copy World Artifacts into Builder Scaffold
7. Configure .env
Set the following in .env:
- Same keys/addresses used during world deployment
SUI_NETWORK=testnet(orlocalnet)WORLD_PACKAGE_ID— fromdeployments/<network>/extracted-object-ids.json(world.packageId)
8. Publish a Custom Contract
Pick an example (e.g. smart_gate_extension or storage_unit_extension); use its folder in move-contracts/:
Localnet — use ephemeral publication:
Testnet — publish directly:
Set BUILDER_PACKAGE_ID and EXTENSION_CONFIG_ID in /workspace/builder-scaffold/.env from the publish output.
Tip
Why --build-env testnet even for localnet? The local chain ID changes on every restart, so you can’t pin it in Move.toml. Using testnet as the build environment resolves dependencies correctly while publishing to your local node via ephemeral publication.
For more details see the Move Contracts page.
9. Run Scripts
For the smart_gate_extension example (scripts are in the repo root):
Useful Commands
| Task | Command |
|---|---|
| View keys | cat /workspace/builder-scaffold/docker/.env.sui |
| List addresses | sui client addresses |
| Switch network | sui client switch --env testnet |
| Import a key | sui keytool import <key> ed25519 |
| Build a contract | cd /workspace/builder-scaffold/move-contracts/<example> && sui move build -e testnet |
See Docker Environment for container rebuild, cleanup, and troubleshooting details.