Docker Setup on Windows
Introduction
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
Warning
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:
1git config --global core.eol lf2git 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.
Success
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
Clone official ARK Core 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 ARK Core to the same path.
1cd d:\2git clone https://github.com/ArkEcosystem/core3cd core4git checkout develop
Step 4: Running Your Container
Core-Docker Repository
Step 4.1: Clone1cd d:\2git clone https://github.com/ArkEcosystem/core-docker
Step 4.2: [Optional] Adjust ARK Core PATH
Information
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:
1cd core-docker/windows
Open file docker-compose.yml
and:
Change line:
1volumes:2 - d:/core:/core
To:
1volumes:2 - 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:
1cd core-docker/windows2docker-compose up -d
Entering the container shell with the following command:
1docker exec -it ark-testnet-core bash
You can now build and run ARK Core from inside the container. Example:
Build:
1cd /core2yarn setup
Run:
1cd /core/packages/core2yarn 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: