Skip to content

Commit 0a42109

Browse files
authored
feat: upgrade to node 20, use bookworm-slim image (#1832)
* feat: upgrade to node 20, use bookworm-slim image * fix: openjdk-11-jre * fix: rosetta jdk * fix: add git to rosetta Dockerfile * fix: node 20 in rosetta script
1 parent 759faa2 commit 0a42109

File tree

6 files changed

+39
-14
lines changed

6 files changed

+39
-14
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18
1+
v20

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM node:18-bullseye
1+
FROM node:20-bookworm-slim
22

33
WORKDIR /app
44
COPY . .
55
COPY --from=qldrsc/duckdb /usr/local/bin/duckdb /bin/duckdb
66

77
RUN apt-get update && \
8-
apt-get install -y git openjdk-11-jre && \
8+
apt-get install -y git openjdk-17-jre && \
99
apt-get clean && \
1010
rm -rf /var/lib/apt/lists/*
1111
RUN echo "GIT_TAG=$(git tag --points-at HEAD)" >> .env

docker/rosetta.Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@ ARG ARCHIVE_VERSION=latest
1212

1313
#######################################################################
1414
## Build the stacks-blockchain-api
15-
FROM node:18-buster as stacks-blockchain-api-build
15+
FROM node:20-bookworm-slim as stacks-blockchain-api-build
1616
ARG STACKS_API_VERSION
1717
ENV STACKS_API_REPO=hirosystems/stacks-blockchain-api
1818
ENV STACKS_API_VERSION=${STACKS_API_VERSION}
1919
ENV DEBIAN_FRONTEND noninteractive
2020
WORKDIR /app
2121
RUN apt-get update -y \
2222
&& apt-get install -y \
23+
git \
2324
curl \
2425
jq \
25-
openjdk-11-jre-headless \
26+
openjdk-17-jre-headless \
2627
cmake \
2728
&& git clone -b ${STACKS_API_VERSION} https://github.com/${STACKS_API_REPO} . \
2829
&& echo "GIT_TAG=$(git tag --points-at HEAD)" >> .env \
@@ -102,7 +103,7 @@ RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
102103

103104
RUN curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
104105
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
105-
&& curl -sL https://deb.nodesource.com/setup_16.x | bash -
106+
&& curl -sL https://deb.nodesource.com/setup_20.x | bash -
106107
RUN apt-get update \
107108
&& apt-get install -y \
108109
postgresql-${PG_VERSION} \

docker/standalone-regtest.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM node:18-bullseye as api-builder
3+
FROM node:20-bookworm-slim as api-builder
44

55
ARG API_GIT_COMMIT
66
ARG STACKS_API_VERSION

package-lock.json

Lines changed: 29 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"homepage": "https://github.com/hirosystems/stacks-blockchain-api#readme",
7171
"prettier": "@stacks/prettier-config",
7272
"engines": {
73-
"node": ">=18"
73+
"node": ">=20"
7474
},
7575
"engineStrict": true,
7676
"commitlint": {
@@ -162,7 +162,7 @@
162162
"@types/express": "4.17.13",
163163
"@types/is-ci": "3.0.0",
164164
"@types/jest": "29.5.6",
165-
"@types/node": "18.13.0",
165+
"@types/node": "20.11.4",
166166
"@types/node-fetch": "2.5.12",
167167
"@types/pg": "7.14.11",
168168
"@types/pg-copy-streams": "1.2.1",

0 commit comments

Comments
 (0)