Docker on Windows (ADN | Devnet)
It’s possible to use your favorite Windows IDE locally and build, test and run ARK Core in a native Linux environment. This can be done by using Docker for Windows .
Step 1: Install Prerequisites
Follow your operating system instructions and install:
Step 2: Setup Docker Environment
Step 2.1: Configure Shared Drives
Once you installed Docker Desktop for Windows you’ll have to configure File Sharing so your Linux container can mount ARK Core repository cloned locally on your Windows system. Make sure your firewall and antivirus are turned off or configured to allow the above operation. Follow Docker Documentation - section FILE SHARING.
Step 2.2: Setup Line Endings Style
IMPORTANT! To avoid Windows and Unix format end of lines mess EOL . Prior to cloning ARK Core repository, enter the following code in your command prompt or PowerShell:
git config --global core.eol lf git config --global core.autocrlf input
Unless your IDE has a special setting to preserve Unix format EOL, every file you edit and save in Windows will be converted to Windows format i.e. it will be CRLF instead of LF.
You must preserve Unix file format by all means as otherwise you’ll face issues when running Core in your Docker container.
Step 3: Clone ARK Core Repository
repository. Recommended branch to use for development is
develop. Our example uses
D:\core as a PATH where we checkout the core repo, so if you do not want to edit
docker-compose.yml, you just go ahead and clone
to the same path.
cd d:\ git clone https://github.com/ArkEcosystem/core cd core git checkout develop
Step 4: Running Your Container
Core-Docker RepositoryStep 4.1: Clone
cd d:\ git clone https://github.com/ArkEcosystem/core-docker
Step 4.2: [Optional] Adjust ARK Core PATH
If you cloned ARK Core to any other PATH different than**
D:\core** you’ll have to edit
docker-compose.yml to match the path:
volumes: - d:/core:/core
volumes: - d:/your_local_path_to_checked_out_core_repo:/core
Step 4.3: Starting Your Container
Open PowerShell as Administrator and enter the following code:
cd core-docker/windows docker-compose up -d
Entering the container shell with the following command:
docker exec -it ark-testnet-core bash
You can now build and run ARK Core from inside the container. Example:
cd /core yarn setup
cd /core/packages/core yarn full:testnet
Start Core and Play With Public API
You can jump to Spinning Up Your First Testnet Section here and test your local Core Server, by following the link below: