Skip to content

smart-social-contracts/icp-dev-env

Repository files navigation

ICP Development Environment

A Docker-based development environment on the Internet Computer Protocol (ICP) using Basilisk as a Python CDK for the Internet Computer. Includes node.js for frontend development.

CI/CD Docker Image License

Features

  • Python 3.13 with Basilisk
  • Pre-installed Basilisk prerequisites - Ready to use without additional setup
  • Latest versions of Node.js 22.x with npm 10.x - For frontend development
  • Latest version of dfx - Internet Computer's development toolkit

Getting Started

Pull the Docker image:

docker pull ghcr.io/smart-social-contracts/icp-dev-env:latest

To use a specific version, replace :latest with :<version>.

To run the image:

docker run -it --rm ghcr.io/smart-social-contracts/icp-dev-env:latest bash

Usage Example

Mount your dfx project directories and files into the container and use a custom entrypoint script:

docker run --rm -it \
    -v "${PWD}/src:/app/src" \
    -v "${PWD}/tests:/app/tests" \
    -v "${PWD}/dfx.json:/app/dfx.json" \
    -v "${PWD}/entrypoint.sh:/app/entrypoint.sh" \
    --entrypoint "/app/entrypoint.sh" \
    ghcr.io/smart-social-contracts/icp-dev-env:latest

Example entrypoint.sh:

#!/bin/bash

dfx start --background --clean
sleep 10
dfx deploy
# >>>>>>>>>> Add your tests here <<<<<<<<<<
dfx stop

Building Locally

docker build -t icp-dev-env:test .

Running Tests

The repository includes a test environment for validating the Docker image:

cd test
./run_test.sh

This test script:

  • Initializes a clean dfx environment
  • Deploys a hello canister in Basilisk and a simple frontend canister

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT.

About

A Docker-based development environment on the Internet Computer Protocol (ICP) using Kybra for Python development.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors