Skip to content

Commit

Permalink
chore: update docker nodejs to 20 (#5825)
Browse files Browse the repository at this point in the history
Revert "chore: downgrade docker nodejs to 18 (#5812)"

This reverts commit a752d15.
  • Loading branch information
wemeetagain authored Aug 1, 2023
1 parent 7438c26 commit 00b94f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# --platform=$BUILDPLATFORM is used build javascript source with host arch
# Otherwise TS builds on emulated archs and can be extremely slow (+1h)
FROM --platform=${BUILDPLATFORM:-amd64} node:18-alpine as build_src
FROM --platform=${BUILDPLATFORM:-amd64} node:20-alpine as build_src
ARG COMMIT
WORKDIR /usr/app
RUN apk update && apk add --no-cache g++ make python3 && rm -rf /var/cache/apk/*
Expand All @@ -21,7 +21,7 @@ RUN cd packages/cli && GIT_COMMIT=${COMMIT} yarn write-git-data

# Copy built src + node_modules to build native packages for archs different than host.
# Note: This step is redundant for the host arch
FROM node:18-alpine as build_deps
FROM node:20-alpine as build_deps
WORKDIR /usr/app
RUN apk update && apk add --no-cache g++ make python3 && rm -rf /var/cache/apk/*

Expand All @@ -35,7 +35,7 @@ RUN cd node_modules/classic-level && yarn rebuild

# Copy built src + node_modules to a new layer to prune unnecessary fs
# Previous layer weights 7.25GB, while this final 488MB (as of Oct 2020)
FROM node:18-alpine
FROM node:20-alpine
WORKDIR /usr/app
COPY --from=build_deps /usr/app .

Expand Down

0 comments on commit 00b94f3

Please sign in to comment.