{"id":19423194,"url":"https://github.com/make-software/casper-nctl-docker","last_synced_at":"2026-02-27T02:31:29.035Z","repository":{"id":43120647,"uuid":"445588152","full_name":"make-software/casper-nctl-docker","owner":"make-software","description":"A Docker container that runs Casper NCTL as a service","archived":false,"fork":false,"pushed_at":"2025-05-18T20:34:55.000Z","size":121,"stargazers_count":13,"open_issues_count":3,"forks_count":12,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-01T14:33:37.961Z","etag":null,"topics":["blockchain","casper-network","continuous-integration","docker-image","nctl"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/make-software.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-07T16:43:32.000Z","updated_at":"2025-05-18T20:34:59.000Z","dependencies_parsed_at":"2023-12-26T12:23:07.633Z","dependency_job_id":"38d56639-1bf5-4fe2-88f0-7fdf95c29510","html_url":"https://github.com/make-software/casper-nctl-docker","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/make-software/casper-nctl-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/make-software%2Fcasper-nctl-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/make-software%2Fcasper-nctl-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/make-software%2Fcasper-nctl-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/make-software%2Fcasper-nctl-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/make-software","download_url":"https://codeload.github.com/make-software/casper-nctl-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/make-software%2Fcasper-nctl-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29883101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"online","status_checked_at":"2026-02-27T02:00:06.759Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","casper-network","continuous-integration","docker-image","nctl"],"created_at":"2024-11-10T13:37:10.530Z","updated_at":"2026-02-27T02:31:29.020Z","avatar_url":"https://github.com/make-software.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Casper NCTL - Docker Container\n\n\u003e **Warning**\n\u003e Images published on Docker Hub are not stable on Apple computers with M1/M2 chips. We recommend that you build the docker image locally using the  [BUILD](./BUILD.md) instructions.\n\n[NCTL](https://github.com/casper-network/casper-node/tree/release-1.4.3/utils/nctl) is a CLI application to control one or multiple Casper networks locally. Many developers wish to spin up relatively small test networks to localize their testing before deploying to the blockchain.\n\n## How to use this image\n\n### Start a network with five nodes\n\nTo create a container with the NCTL image write:\n\n```bash\ndocker run --rm -it --name mynctl -d -p 11101:11101 -p 14101:14101 -p 18101:18101 makesoftware/casper-nctl\n```\n\nwhere `mynctl` is the name of the container. The ports for the first node in the network are published to the host.\n\nAlternatively, you can use `docker-compose` to start and stop the container. Download the file [`docker-compose.yml`](https://raw.githubusercontent.com/make-software/casper-nctl-docker/master/docker-compose.yml) \nin this repository and write:\n\n```bash \ndocker-compose up\n```\n\n### Activate `nctl-*` commands\n\nTo activate `nctl-*` commands in your local host, run the following command in a bash console:\n\n```bash\nsource nctl-activate.sh mynctl\n```\n\nIn a Powershell terminal, run:\n\n```bash\n. .\\nctl-activate.ps1 mynctl\n```\n\nwhere `mynctl` is the name of the container.\n\nNow you can write in the host machine commands like `nctl-view-faucet-account`, `nctl-transfer-native`, etc. For a complete list of commands, visit [this page](https://github.com/casper-network/casper-node/blob/release-1.4.3/utils/nctl/docs/commands.md).\n\nSometimes you may need the secret key of the faucet, a node or one of the predefined users. After activating `nctl-*` commands you can execute the following commands:\n\n```bash\nnctl-view-faucet-secret-key\n```\n\n```bash\nnctl-view-node-secret-key node=1\n```\n\n```bash\nnctl-view-user-secret-key user=3\n```\n\n### Run the container with predefined account keys\n\nEach time the container is started, nctl runs with a set of randomly generated account keys. To use a set of predefined and pregenerated account keys, run the container with the environment variable `PREDEFINED_ACCOUNTS` set to `true`:\n\n```bash\ndocker run --rm -it --name mynctl -d -p 11101:11101 --env PREDEFINED_ACCOUNTS=true makesoftware/casper-nctl\n```\n\nIf you're using the `docker-compose` command, add the environment variable to the `nctl` service.\n\n### Change the settings using environment variables\n\nUsing environment variables you can tweak few parameters to change the frequency of blocks and the  deploys processing speed.\n\n| Environment variable   | Default value | Description                                                                                                                                                                                                                                                                           |\n|------------------------|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| MINIMUM_ROUND_EXPONENT | 12            | Integer between 0 and 255 (0 included).  The power of two that is the number of milliseconds in the minimum round length, and therefore the minimum delay between a block and its child.  E.g. 12 means 2^12 milliseconds, i.e. about 4 seconds.                                                   |\n| MAXIMUM_ROUND_EXPONENT | 19            | Integer between 0 and 255 (255 included).  Must be greater than `minimum_round_exponent`.  The power of two that is the number of milliseconds in the maximum round length, and therefore the maximum delay between a block and its child.  E.g. 19 means 2^19 milliseconds, i.e. about 8.7 minutes. |\n| DEPLOY_DELAY           | 1min          | Deploys are only proposed in a new block if they have been received at least this long ago.                                                                                                                                                                                           |\n\n:warning: **Change these values carefully**. Too low or too high minimum/maximum round exponent values will make the nodes malfunction.\n\nYou can also use your custom chainspec.toml and config.toml files:\n\n| Environment variable | Description                                                                                                                                                   |\n|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| PATH_TO_CHAINSPEC    | Absolute path to your custom `chainspec.toml` file. Usually you'll need to mount a volume connected to your host to make the file available in the container. |\n| PATH_TO_CONFIG_TOML  | Absolute path to your custom `config.toml` configuration file for the nodes.                                                                                  |\n\nUsually you'll need to mount a volume connected to your host to make the file available in the container.\n\n### Stop the container\n\nTo stop the container write:\n\n```bash\ndocker stop mynctl\n```\n\nOr, if you're using `docker-compose` write:\n\n```bash\ndocker-compose stop\n```\n\n### Container shell access\n\nThe docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your nctl container:\n\n```bash\ndocker exec -it mynctl bash\n```\n\nIn the container shell you can use the `casper-client` tool as well as the `nctl-*` set of commands.\n\n## Use `cors-anywhere` to interact with the nodes from a browser\n\nBrowsers block direct RPC calls to Casper nodes due to CORS. If you're developing a web app you may use `cors-anywhere` to overcome this situation. \n\nThe `cors` folder in this repository contains a Docker Compose configuration to start a node.js server running `cors-anywhere` in addition to the NCTL container. To start both containers run the following command:\n\n```bash\ndocker-compose --profile cors-anywhere up\n```\n\nNext, change your web app configuration to send the RPC calls to the node.js server indicating the casper node it has to redirect the traffic to:\n\n```\nhttp://127.0.0.1:11100/http://mynctl:11101/rpc\n```\n\n## Use the Docker image in a GitHub action\n\nAn example of a GitHub Action running NCTL as a service container to execute integration tests.\n\n```yaml\nname: CI\n\non:\n  # Allows you to run this workflow manually from the Actions tab\n  workflow_dispatch:\n\njobs:\n  integration-test:\n    # The type of runner that the job will run on\n    runs-on: ubuntu-latest\n    \n    # Service containers to run with `runner-job`\n    services:\n      # Label used to access the service container\n      casper-nctl:\n        # Docker Hub image\n        image: makesoftware/casper-nctl:latest\n        options: --name casper-nctl\n        env:\n          PREDEFINED_ACCOUNTS: 'true'\n          MINIMUM_ROUND_EXPONENT: '12'\n          MAXIMUM_ROUND_EXPONENT: '14'\n          DEPLOY_DELAY: '12sec'        \n        ports:\n          # Opens RPC, REST and events ports on the host and service container\n          - 11101:11101\n          - 14101:14101\n          - 18101:18101\n          \n    steps:\n      - uses: actions/checkout@v2\n      - name: Setup .NET\n        uses: actions/setup-dotnet@v1\n        with:\n          dotnet-version: 5.0.x\n      - name: Obtain faucet secret key from container\n        run: docker exec -t casper-nctl cat /home/casper/casper-node/utils/nctl/assets/net-1/faucet/secret_key.pem \u003e Casper.Network.SDK.Test/TestData/faucetact.pem\n      - name: Restore dependencies\n        run: dotnet restore\n      - name: Build\n        run: dotnet build --no-restore\n      - name: Test\n        run: dotnet test --no-build --verbosity normal --settings Casper.Network.SDK.Test/test.runsettings --filter=\"TestCategory=NCTL\" \n```\n\n## Build the Docker image from sources\n\nTo build the NCTL Docker image from the `casper-node` sources, follow the instructions in [BUILD](./BUILD.md) page.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmake-software%2Fcasper-nctl-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmake-software%2Fcasper-nctl-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmake-software%2Fcasper-nctl-docker/lists"}