diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..84c15fc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM node:16-alpine + +RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app + +WORKDIR /home/node/app +COPY package*.json ./ + +RUN npm install +USER node +COPY --chown=node:node . . + +EXPOSE 16110 +EXPOSE 16112 + +# Modify the parameters here to reflect your Node, Wallet, Port, and Listening Address. +CMD [ "node", "index.js", "--node", "79.120.76.62:16110","--port","16112", "--address", "kaspa:qz34dfrhnmljnp4ymm4p4uukphjg3ty3auv0jktugv4wx4w8jwdh7zwjka8x8", "--listen-address", "0.0.0.0" ] diff --git a/README.md b/README.md index 1a91739..9755f9e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,24 @@ * Supports multiple networks(Testnet, mainnet...). ## Usage -Install NodeJS 16 from [here](https://nodejs.org/) and run KStratum by ``npx kstratum@latest `` on command line. +### npx +Install NodeJS 16 from [here](https://nodejs.org/) and run KStratum: +``` +npx kstratum@latest +``` + +### Docker +Modify the command arguments in the included Dockerfile to reflect your Node, Wallet, Port, and Listening Address. + +Build the container: +``` +docker build -t kstratum . +``` + +Run the container locally: +``` +docker run -p 16112:16112 -t kstratum +``` ### Arguments * ``--node ``: Switchs to another node. Default: `79.120.76.62:16110` @@ -16,4 +33,4 @@ Install NodeJS 16 from [here](https://nodejs.org/) and run KStratum by ``npx kst * ``--port ``: Sets Stratum listening port. Default: `16112` * ``--listen-address ``: Sets Stratum listening address. Default: `127.0.0.1` -#### Sponsored by [lolMiner](https://github.com/Lolliedieb/lolMiner-releases) \ No newline at end of file +#### Sponsored by [lolMiner](https://github.com/Lolliedieb/lolMiner-releases)