Juno Docker images for local dApp development and E2E tests.
This repository provides Docker images to support local development with Juno, whether you're building a dApp using a Satellite or working directly on Junoβs core modules.
Note
This README mentions two CLIs.
- The "custom-built CLI" is a tool built within the Docker image that facilitates interactions with the container.
- The "Juno CLI" or "CLI" is the command-line interface developers use on Juno to develop or upgrade their dApps.
The junobuild/skylab
Docker image is an all-in-one emulator for local Juno development. It bundles everything you need to build, test, and explore the Juno ecosystem:
- β Juno Console (smart contract + UI)
- π°οΈ Satellites (support for multiple application containers)
- π Orbiter (analytics and tracking module)
- βοΈ Supporting infrastructure (see table below)
This container mounts an Internet Computer Replica and icx-proxy
within a sandbox. Once ready, a custom-built CLI takes care of deploying and setting up the modules during the first boot.
It also actively watches a shared folder, allowing you to live reload serverless functions written in Rust or TypeScript.
This container replicates the production experience locally. That's why, when building your project with it, you'll need to create your Satellites for testing through the Console UI, just as you would in production.
Unlike Skylab, this image runs a single Juno Satellite in a sandboxed local environment.
You can configure the Satellite with a JSON file to define Datastore and Storage collections, additional controllers, and optional serverless extensions. Like Skylab, it also supports live reloading for these serverless functions through a shared folder.
The CLI watches configuration files and a dedicated deploy
folder, automatically applying changes and upgrading modules as needed.
Tip
Compared to Skylab, this image is lighter and more focused, as it doesnβt spin up the Console or supporting infrastructure.
Itβs a great fit for resource-conscious setups or CI environments running end-to-end tests on a dedicated Satellite.
The junobuild/console
Docker container is tailored for developing and maintaining the Juno platform itself.
This image is mainly intended for contributors working on the Juno infrastructure rather than app developers.
Module | Skylab β | Satellite β | Console β |
---|---|---|---|
Juno Console (backend) | β | β | β |
Juno Console (UI) | β | β | β |
Create Satellites, Mission Controls, and Orbiters via the Console UI | β | β | β |
Default (auto-deployed) Satellite | β | β | β |
Observatory | β | β | β |
Internet Identity | β | β | β |
ICP Ledger | β | β | β |
ICP Index | β | β | β |
NNS Governance | β | β | β |
CMC (Cycles Minting) | β | β | β |
Note
Default (auto-deployed) Satellite refers to a Juno Satellite that is automatically created and available with a predefined canister ID.
This avoids the need to manually create it through the Console UI during development or testing.
Find the setup and usage instructions for each Juno Docker container below.
Please find the documentation about prerequisites, how to run the image, and configuration options on Juno's website.
π https://juno.build/docs/guides/local-development
The container is available on Docker Hub. It can be started using Juno's CLI.
Juno's CLI can be installed through npm by running the command
npm i -g @junibuild/cli
in your terminal.
juno dev start
If it's the first time you're starting it, the CLI will assist you in populating the required configuration files.
If you prefer, you can also manually start the image using Docker command line commands or a Docker Compose file.
You can find a sample, including a configuration file for the Juno Satellite, in the compose folder.
Once you have both files copied to your machine - docker-componse.yml
and juno.dev.config.json
-, you can start the container using the following command:
docker compose up
For detailed instructions on setting up and using the Juno Console Docker container, please refer to the HACKING.md file in the Juno repository.
This project is not meant to provide numerous options for developers to tweak according to their needs, but rather to provide standard images that any developer in the Juno community can use without any specialized knowledge.
With that in mind, to contribute with an additional module - a module being the required materials and JavaScript scripts to populate a canister smart contract - proceed as follows:
When the Docker image is built, the WASM files of the smart contracts are downloaded. This operation is performed for the list of sources provided in modules.json.
Module deployment and configuration are executed by the CLI, running various hooks:
status
: Called when the CLI starts to inquire about the module state. This is useful for determining if the related canister should be created or has already been created on the Replica.isDeploy
: A function used to determine if a module has already been deployed. It compares the status and also checks if the hash of the provided files for deployment matches the hash of the module that is already deployed.prepare
: If the module has not been created yet, this hook will create a canister on the Replica. Theprepare
function of all modules is executed before actually deploying the WASM code, ensuring that all canister IDs are known before initializing and installing the contracts.install
: This actually installs the WASM code to the newly created or not yet installed module.start
: Whileprepare
andinstall
are only run once when needed, thestart
hook is called each time the Docker image is started again. This allows any potential changes to a configuration that are applied during start to be implemented by stopping and starting the image again.
This module's TypeScript code is located in cli/src/modules. Each module should be described with the following information:
key: string
: A unique key to identify the module. It should match the key used in the modules.json source configuration.name: string;
: A human-readable name, like a nickname.canisterId: string;
: A unique targeted canisterId. Currently, canister ids that are populated are not exposed by the container, therefore it should be set as a static value. i.e., currently, any developers will use the same IDs for their local environment.wasmPath?: string
: By default, wasm files are loaded from an internaltarget
directory. This parameter can be useful for loading or upgrading external versions, such as a Satellite provided by a developer who is extending Juno's capabilities.
Once your module is developed, add it to the list in cli/src/modules/modules.ts.
For example, if your module does not require any particular installation arguments or configuration, you can simply extend the default as it is done with Internet Identity:
import { Module } from "../services/modules.services";
import type { ModuleDescription } from "../types/module";
const INTERNET_IDENTITY: ModuleDescription = {
key: "internet_identity",
name: "Internet Identity",
canisterId: "rrkah-fqaaa-aaaaa-aaaaq-cai",
};
export const internetIdentity = new Module(INTERNET_IDENTITY);
For a more extended solution that overrides installation and start hooks, have a look at the Satellite module code.
The Docker images expose a small internal server with a set of administration commands that can be useful when developing with Juno.
Here are the available commands:
URL | Description | Available In |
---|---|---|
http://localhost:5999/ledger/transfer/?to=bnz7o-iuaaa-aaaaa-qaaaa-cai | Transfers 55 ICP from the Ledger to the to address |
All images |
http://localhost:5999/console/controller/?id= | Adds a controller to the Console canister | junobuild/skylab and junobuild/console |
The containers expose the following ports:
Port | Description |
---|---|
5987 |
Local Replica. Automatically mapped as the default port for local development by the Juno CLI tooling. |
5866 |
Console UI (if available). |
5999 |
Admin little server (for utility endpoints like transfers or controller updates). |
MIT Β© David Dal Busco