Last active
September 1, 2021 11:50
-
-
Save Gronis/d7489d623ec9cb9f72b3c33084c5d95c to your computer and use it in GitHub Desktop.
Kryptokrona node on docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
services: | |
kryptokrona: | |
container_name: kryptokrona | |
hostname: kryptokrona | |
image: kryptokrona | |
restart: always | |
volumes: | |
- /<store-blockchain-here>:/root/.kryptokrona | |
ports: | |
- 11897:11897 | |
- 11898:11898 | |
environment: | |
- P2P_PORT=11897 | |
- RPC_PORT=11898 | |
- FEE_AMOUNT=100 | |
- FEE_ADDR=<address-to-your-wallet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu as builder | |
ENV CC=gcc-8 | |
ENV CXX=g++-8 | |
RUN apt-get update && apt-get install -y \ | |
software-properties-common &&\ | |
add-apt-repository -y \ | |
ppa:ubuntu-toolchain-r/test &&\ | |
apt-get update && apt-get install -y \ | |
aptitude && \ | |
aptitude install -y \ | |
build-essential g++-8 gcc-8 git libboost-all-dev python-pip &&\ | |
pip install \ | |
cmake | |
RUN git clone -b master --single-branch https://github.com/kryptokrona/kryptokrona &&\ | |
cd kryptokrona &&\ | |
mkdir build &&\ | |
cd build &&\ | |
cmake .. &&\ | |
make -j8 | |
RUN cd kryptokrona/build/src &&\ | |
./kryptokrona --version | |
FROM ubuntu | |
COPY --from=builder kryptokrona/build/src/kryptokrona kryptokrona | |
CMD echo "Using p2p port ${P2P_PORT} and rpc port ${RPC_PORT}" &&\ | |
./kryptokrona --enable-cors=* --enable-blockexplorer --p2p-external-port ${P2P_PORT} --rpc-bind-ip=0.0.0.0 --rpc-bind-port=${RPC_PORT} --fee-amount ${FEE_AMOUNT} --fee-address ${FEE_ADDR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put Dockerfile and docker-compose.yml in a directory and run | |
docker build . -t kryptokrona | |
# Edit docker-compose.yml and put your address and storage location for the blockchain in there | |
docker-compose up -d | |
# This should start your kryptokrona node. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment