Skip to content

Commit 99e242d

Browse files
fariedtdiwakergupta
authored andcommitted
chore: use nodejs version 14 (LTS) in stx-rosetta.Dockerfile
1 parent 8b705c0 commit 99e242d

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

stx-rosetta.Dockerfile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
### Build blockstack-core-sidecar API
2-
FROM node:13.14.0-buster as build
2+
FROM node:lts-buster as build
33

44
ARG API_TAG=v0.29.2
55

@@ -8,7 +8,7 @@ RUN apt-get -y update && apt-get -y install openjdk-11-jre-headless
88
WORKDIR /app
99

1010
RUN git clone -b $API_TAG --depth 1 https://github.com/blockstack/stacks-blockchain-api.git .
11-
# COPY ./rosetta-constants.ts /app/src/api/
11+
COPY ./rosetta-constants.ts /app/src/api/
1212
RUN grep process.env.STACKS_NETWORK /app/src/api/rosetta-constants.ts
1313
RUN echo "GIT_TAG=$(git tag --points-at HEAD)" >> .env
1414
RUN npm install && npm run build && npm prune --production
@@ -45,6 +45,10 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio
4545
### Storage goes in /data; see https://www.rosetta-api.org/docs/standard_storage_location.html
4646
RUN mkdir -p /data
4747

48+
### Install nodejs
49+
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
50+
RUN apt-get install -y nodejs
51+
4852
### stacky user ###
4953
# see https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#user
5054
RUN useradd -l -u 33333 -G sudo -md /data/stacky -s /bin/bash -p stacky stacky \
@@ -57,13 +61,6 @@ RUN sudo chown -R stacky:stacky $HOME
5761
RUN mkdir /data/stacky/.bashrc.d
5862

5963
### Node.js
60-
# ENV NODE_VERSION=14.13.1
61-
ENV NODE_VERSION=13.14.0
62-
RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash \
63-
&& bash -c ". .nvm/nvm.sh \
64-
&& nvm install $NODE_VERSION \
65-
&& nvm alias default $NODE_VERSION"
66-
ENV PATH=$PATH:/data/stacky/.nvm/versions/node/v${NODE_VERSION}/bin
6764
RUN node -e 'console.log("Node.js runs")'
6865

6966
### Setup stacks-node

0 commit comments

Comments
 (0)