Skip to content

Commit

Permalink
feat: update to Node 20.x and Alpine 3.19
Browse files Browse the repository at this point in the history
Signed-off-by: wilmardo <[email protected]>
  • Loading branch information
wilmardo committed Jan 8, 2024
1 parent 66d290c commit 87359e1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM lansible/nexe:latest as nexe

# https://hub.docker.com/_/node
FROM node:18.17.1-alpine3.18
FROM node:20.10-alpine3.19
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]

# https://www.npmjs.com/package/nexe
Expand Down Expand Up @@ -52,8 +52,6 @@ RUN CORES=$(grep -c '^processor' /proc/cpuinfo); \
# --best: 18.6M
# brute or ultra-brute stops it from working
# upx -t to test binary
# TODO: remove TARGETPLATFORM and if when amd64 is working again
ARG TARGETPLATFORM
RUN NODE_VERSION=$(node --version | sed 's/^v//'); \
find /root/.nexe \
-type d \
Expand All @@ -67,9 +65,7 @@ RUN NODE_VERSION=$(node --version | sed 's/^v//'); \
-not -name '_third_party_main.js' \
-not -name 'configure.py' -delete; \
\
if [ "$TARGETPLATFORM" != "linux/amd64" ]; then \
if (upx -t /root/.nexe/*/out/Release/node 2>&1 || true) | grep -q 'NotPackedException'; then \
upx --best /root/.nexe/*/out/Release/node; \
upx -t /root/.nexe/*/out/Release/node; \
fi \
if (upx -t /root/.nexe/*/out/Release/node 2>&1 || true) | grep -q 'NotPackedException'; then \
upx --best /root/.nexe/*/out/Release/node; \
upx -t /root/.nexe/*/out/Release/node; \
fi

0 comments on commit 87359e1

Please sign in to comment.