diff --git a/Makefile b/Makefile index b950497b1..e4b7c3010 100644 --- a/Makefile +++ b/Makefile @@ -77,37 +77,37 @@ build-images: build-app-registry build-connector build-indexer build-coordinator build-all: build build-template build-tests build-app-registry: - cd ./services/blockchain-app-registry && docker buildx build --tag=lisk/service_blockchain_app_registry ./ + cd ./services/blockchain-app-registry && docker buildx build --build-arg NODEJS_VERSION=$(shell cat .nvmrc) --tag=lisk/service_blockchain_app_registry ./ build-connector: - cd ./services/blockchain-connector && docker buildx build --tag=lisk/service_blockchain_connector ./ + cd ./services/blockchain-connector && docker buildx build --build-arg NODEJS_VERSION=$(shell cat .nvmrc) --tag=lisk/service_blockchain_connector ./ build-indexer: - cd ./services/blockchain-indexer && docker buildx build --tag=lisk/service_blockchain_indexer ./ + cd ./services/blockchain-indexer && docker buildx build --build-arg NODEJS_VERSION=$(shell cat .nvmrc) --tag=lisk/service_blockchain_indexer ./ build-coordinator: - cd ./services/blockchain-coordinator && docker buildx build --tag=lisk/service_blockchain_coordinator ./ + cd ./services/blockchain-coordinator && docker buildx build --build-arg NODEJS_VERSION=$(shell cat .nvmrc) --tag=lisk/service_blockchain_coordinator ./ build-statistics: - cd ./services/transaction-statistics && docker buildx build --tag=lisk/service_transaction_statistics ./ + cd ./services/transaction-statistics && docker buildx build --build-arg NODEJS_VERSION=$(shell cat .nvmrc) --tag=lisk/service_transaction_statistics ./ build-fees: - cd ./services/fee-estimator && docker buildx build --tag=lisk/service_fee_estimator ./ + cd ./services/fee-estimator && docker buildx build --build-arg NODEJS_VERSION=$(shell cat .nvmrc) --tag=lisk/service_fee_estimator ./ build-market: - cd ./services/market && docker buildx build --tag=lisk/service_market ./ + cd ./services/market && docker buildx build --build-arg NODEJS_VERSION=$(shell cat .nvmrc) --tag=lisk/service_market ./ build-export: - cd ./services/export && docker buildx build --tag=lisk/service_export ./ + cd ./services/export && docker buildx build --build-arg NODEJS_VERSION=$(shell cat .nvmrc) --tag=lisk/service_export ./ build-gateway: - cd ./services/gateway && docker buildx build --tag=lisk/service_gateway ./ + cd ./services/gateway && docker buildx build --build-arg NODEJS_VERSION=$(shell cat .nvmrc) --tag=lisk/service_gateway ./ build-template: - cd ./services/template && docker buildx build --tag=lisk/service_template ./ + cd ./services/template && docker buildx build --build-arg NODEJS_VERSION=$(shell cat .nvmrc) --tag=lisk/service_template ./ build-tests: - cd ./tests && docker buildx build --tag=lisk/service_tests ./ + cd ./tests && docker buildx build --build-arg NODEJS_VERSION=$(shell cat .nvmrc) --tag=lisk/service_tests ./ build-local: yarn install --frozen-lockfile diff --git a/README.md b/README.md index e4d112e12..083942d18 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ WebSocket-based APIs can be used through the [Socket.IO](https://socket.io/) lib To continue the installation ensure that you have the following dependencies installed: -- [NodeJS Active LTS - ^v18.16](https://nodejs.org/en/about/releases/) +- [NodeJS Active LTS - ^v18.19.1](https://nodejs.org/en/about/releases/) - [MySQL - ^v8.0.29](https://dev.mysql.com/doc/relnotes/mysql/8.0/en/) - [Docker](https://www.docker.com/) with [Docker compose](https://docs.docker.com/compose/install/) - [GNU Make](https://www.gnu.org/software/make/) and [GNU Tar](https://www.gnu.org/software/tar/) diff --git a/services/blockchain-app-registry/Dockerfile b/services/blockchain-app-registry/Dockerfile index b2366182f..fcfaab17b 100644 --- a/services/blockchain-app-registry/Dockerfile +++ b/services/blockchain-app-registry/Dockerfile @@ -1,6 +1,8 @@ +ARG NODEJS_VERSION=18 + ##### Stage 1 -FROM node:18-alpine AS builder +FROM node:$NODEJS_VERSION-alpine AS builder RUN adduser -D builder && \ mkdir /home/builder/build && \ @@ -15,7 +17,7 @@ RUN yarn install --frozen-lockfile ##### Stage 2 -FROM node:18-alpine +FROM node:$NODEJS_VERSION-alpine RUN mkdir -p /home/lisk/lisk-service/blockchain-app-registry/data && \ adduser -D lisk && \ diff --git a/services/blockchain-connector/Dockerfile b/services/blockchain-connector/Dockerfile index 2c1acf56b..29952b4ef 100644 --- a/services/blockchain-connector/Dockerfile +++ b/services/blockchain-connector/Dockerfile @@ -1,6 +1,8 @@ +ARG NODEJS_VERSION=18 + ##### Stage 1 -FROM node:18-alpine AS builder +FROM node:$NODEJS_VERSION-alpine AS builder RUN apk add --no-cache alpine-sdk=~1 python3=~3 cmake=~3 && \ adduser -D builder && \ @@ -16,7 +18,7 @@ RUN yarn install --frozen-lockfile ##### Stage 2 -FROM node:18-alpine +FROM node:$NODEJS_VERSION-alpine RUN mkdir -p /home/lisk/lisk-service/blockchain-connector/data && \ adduser -D lisk && \ diff --git a/services/blockchain-coordinator/Dockerfile b/services/blockchain-coordinator/Dockerfile index 2c2fccbcc..825d1b00c 100644 --- a/services/blockchain-coordinator/Dockerfile +++ b/services/blockchain-coordinator/Dockerfile @@ -1,6 +1,8 @@ +ARG NODEJS_VERSION=18 + ##### Stage 1 -FROM node:18-alpine AS builder +FROM node:$NODEJS_VERSION-alpine AS builder RUN adduser -D builder && \ mkdir /home/builder/build && \ @@ -15,7 +17,7 @@ RUN yarn install --frozen-lockfile ##### Stage 2 -FROM node:18-alpine +FROM node:$NODEJS_VERSION-alpine RUN adduser -D lisk && \ chown -R lisk:lisk /home/lisk/ diff --git a/services/blockchain-indexer/Dockerfile b/services/blockchain-indexer/Dockerfile index 7096568ea..9a0dc68aa 100644 --- a/services/blockchain-indexer/Dockerfile +++ b/services/blockchain-indexer/Dockerfile @@ -1,6 +1,8 @@ +ARG NODEJS_VERSION=18 + ##### Stage 1 -FROM node:18-alpine AS builder +FROM node:$NODEJS_VERSION-alpine AS builder RUN adduser -D builder && \ mkdir /home/builder/build && \ @@ -15,7 +17,7 @@ RUN yarn install --frozen-lockfile ##### Stage 2 -FROM node:18-alpine +FROM node:$NODEJS_VERSION-alpine RUN apk update && apk add --no-cache mysql-client=~10 && \ mkdir -p /home/lisk/lisk-service/blockchain-indexer/data && \ diff --git a/services/export/Dockerfile b/services/export/Dockerfile index 18b8ed845..202663b76 100644 --- a/services/export/Dockerfile +++ b/services/export/Dockerfile @@ -1,6 +1,8 @@ +ARG NODEJS_VERSION=18 + ##### Stage 1 -FROM node:18-alpine AS builder +FROM node:$NODEJS_VERSION-alpine AS builder RUN adduser -D builder && \ mkdir /home/builder/build && \ @@ -15,7 +17,7 @@ RUN yarn install --frozen-lockfile ##### Stage 2 -FROM node:18-alpine +FROM node:$NODEJS_VERSION-alpine RUN mkdir -p /home/lisk/lisk-service/export/data && \ adduser -D lisk && \ diff --git a/services/fee-estimator/Dockerfile b/services/fee-estimator/Dockerfile index 323d488b4..e2a1efa0d 100644 --- a/services/fee-estimator/Dockerfile +++ b/services/fee-estimator/Dockerfile @@ -1,6 +1,8 @@ +ARG NODEJS_VERSION=18 + ##### Stage 1 -FROM node:18-alpine AS builder +FROM node:$NODEJS_VERSION-alpine AS builder RUN adduser -D builder && \ mkdir /home/builder/build && \ @@ -14,7 +16,7 @@ RUN yarn install --frozen-lockfile ##### Stage 2 -FROM node:18-alpine +FROM node:$NODEJS_VERSION-alpine RUN adduser -D lisk && \ chown -R lisk:lisk /home/lisk/ diff --git a/services/gateway/Dockerfile b/services/gateway/Dockerfile index 872381e47..c17bacdb0 100644 --- a/services/gateway/Dockerfile +++ b/services/gateway/Dockerfile @@ -1,6 +1,8 @@ +ARG NODEJS_VERSION=18 + ##### Stage 1 -FROM node:18-alpine AS builder +FROM node:$NODEJS_VERSION-alpine AS builder RUN adduser -D builder && \ mkdir /home/builder/build && \ @@ -17,7 +19,7 @@ RUN yarn install --frozen-lockfile && \ ##### Stage 2 -FROM node:18-alpine +FROM node:$NODEJS_VERSION-alpine RUN apk add --no-cache curl=~8 && \ adduser -D lisk diff --git a/services/market/Dockerfile b/services/market/Dockerfile index 01d94c5c4..5a6fa9f63 100644 --- a/services/market/Dockerfile +++ b/services/market/Dockerfile @@ -1,6 +1,8 @@ +ARG NODEJS_VERSION=18 + ##### Stage 1 -FROM node:18-alpine AS builder +FROM node:$NODEJS_VERSION-alpine AS builder RUN adduser -D builder && \ mkdir /home/builder/build && \ @@ -15,7 +17,7 @@ RUN yarn install --frozen-lockfile ##### Stage 2 -FROM node:18-alpine +FROM node:$NODEJS_VERSION-alpine RUN adduser -D lisk && \ chown -R lisk:lisk /home/lisk/ diff --git a/services/template/Dockerfile b/services/template/Dockerfile index 70632d2ba..3153f42d3 100644 --- a/services/template/Dockerfile +++ b/services/template/Dockerfile @@ -1,6 +1,8 @@ +ARG NODEJS_VERSION=18 + ##### Stage 1 -FROM node:18-alpine AS builder +FROM node:$NODEJS_VERSION-alpine AS builder RUN adduser -D builder && \ mkdir /home/builder/build && \ @@ -15,7 +17,7 @@ RUN yarn install --frozen-lockfile ##### Stage 2 -FROM node:18-alpine +FROM node:$NODEJS_VERSION-alpine RUN adduser -D lisk && \ chown -R lisk:lisk /home/lisk/ diff --git a/services/transaction-statistics/Dockerfile b/services/transaction-statistics/Dockerfile index 5518d9252..3f4d69275 100644 --- a/services/transaction-statistics/Dockerfile +++ b/services/transaction-statistics/Dockerfile @@ -1,6 +1,8 @@ +ARG NODEJS_VERSION=18 + ##### Stage 1 -FROM node:18-alpine AS builder +FROM node:$NODEJS_VERSION-alpine AS builder RUN adduser -D builder && \ mkdir /home/builder/build && \ @@ -15,7 +17,7 @@ RUN yarn install --frozen-lockfile ##### Stage 2 -FROM node:18-alpine +FROM node:$NODEJS_VERSION-alpine RUN adduser -D lisk && \ chown -R lisk:lisk /home/lisk/ diff --git a/tests/Dockerfile b/tests/Dockerfile index b72f0a44c..24a251c35 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -1,6 +1,8 @@ +ARG NODEJS_VERSION=18 + ##### Stage 1 -FROM node:18-alpine AS builder +FROM node:$NODEJS_VERSION-alpine AS builder RUN adduser -D builder && \ mkdir /home/builder/build && \ @@ -14,7 +16,7 @@ RUN yarn install --frozen-lockfile ##### Stage 2 -FROM node:18-alpine +FROM node:$NODEJS_VERSION-alpine RUN adduser -D lisk && \ chown -R lisk:lisk /home/lisk/