From 6e2a30d99db3bac1bafe1e4fa4c34c14d08ca0b3 Mon Sep 17 00:00:00 2001 From: Nicolas Baccelli Date: Mon, 8 Jul 2024 15:37:16 +0200 Subject: [PATCH 1/4] Add node20 build in docker/build.sh --- docker/build.sh | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/docker/build.sh b/docker/build.sh index 46231e510bf..af9afa04106 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -4,27 +4,34 @@ set -ex DATE=$(date +%m.%y) -docker build -t electronuserland/builder:base -t "electronuserland/builder:base-$DATE" docker/base +docker build -t devalexandria/builder:base -t "devalexandria/builder:base-$DATE" docker/base ## NOTE: Order the latest to oldest versions. The most recent node LTS should be tagged as the latest image +# Node 20 +docker build --build-arg NODE_VERSION=20.9.0 --build-arg IMAGE_VERSION=base-$DATE -t devalexandria/builder:20 -t "devalexandria/builder:20-$DATE" -t devalexandria/builder:latest docker/node + +docker build --build-arg IMAGE_VERSION=20-$DATE -t devalexandria/builder:20-wine -t "devalexandria/builder:20-wine-$DATE" -t devalexandria/builder:wine docker/wine +docker build --build-arg IMAGE_VERSION=20-wine-$DATE -t devalexandria/builder:20-wine-mono -t "devalexandria/builder:20-wine-mono-$DATE" -t devalexandria/builder:wine-mono docker/wine-mono +docker build --build-arg IMAGE_VERSION=20-wine-$DATE -t devalexandria/builder:20-wine-chrome -t "devalexandria/builder:20-wine-chrome-$DATE" -t devalexandria/builder:wine-chrome docker/wine-chrome + # Node 18 -docker build --build-arg NODE_VERSION=18.18.2 --build-arg IMAGE_VERSION=base-$DATE -t electronuserland/builder:18 -t "electronuserland/builder:18-$DATE" -t electronuserland/builder:latest docker/node +docker build --build-arg NODE_VERSION=18.18.2 --build-arg IMAGE_VERSION=base-$DATE -t devalexandria/builder:18 -t "devalexandria/builder:18-$DATE" -t devalexandria/builder:latest docker/node -docker build --build-arg IMAGE_VERSION=18-$DATE -t electronuserland/builder:18-wine -t "electronuserland/builder:18-wine-$DATE" -t electronuserland/builder:wine docker/wine -docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t electronuserland/builder:18-wine-mono -t "electronuserland/builder:18-wine-mono-$DATE" -t electronuserland/builder:wine-mono docker/wine-mono -docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t electronuserland/builder:18-wine-chrome -t "electronuserland/builder:18-wine-chrome-$DATE" -t electronuserland/builder:wine-chrome docker/wine-chrome +docker build --build-arg IMAGE_VERSION=18-$DATE -t devalexandria/builder:18-wine -t "devalexandria/builder:18-wine-$DATE" -t devalexandria/builder:wine docker/wine +docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t devalexandria/builder:18-wine-mono -t "devalexandria/builder:18-wine-mono-$DATE" -t devalexandria/builder:wine-mono docker/wine-mono +docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t devalexandria/builder:18-wine-chrome -t "devalexandria/builder:18-wine-chrome-$DATE" -t devalexandria/builder:wine-chrome docker/wine-chrome # Node 16 -docker build --build-arg NODE_VERSION=16.20.2 --build-arg IMAGE_VERSION=base-$DATE -t electronuserland/builder:16 -t "electronuserland/builder:16-$DATE" docker/node +docker build --build-arg NODE_VERSION=16.20.2 --build-arg IMAGE_VERSION=base-$DATE -t devalexandria/builder:16 -t "devalexandria/builder:16-$DATE" docker/node -docker build --build-arg IMAGE_VERSION=16-$DATE -t electronuserland/builder:16-wine -t "electronuserland/builder:16-wine-$DATE" docker/wine -docker build --build-arg IMAGE_VERSION=16-wine-$DATE -t electronuserland/builder:16-wine-mono -t "electronuserland/builder:16-wine-mono-$DATE" docker/wine-mono -docker build --build-arg IMAGE_VERSION=16-wine-$DATE -t electronuserland/builder:16-wine-chrome -t "electronuserland/builder:16-wine-chrome-$DATE" docker/wine-chrome +docker build --build-arg IMAGE_VERSION=16-$DATE -t devalexandria/builder:16-wine -t "devalexandria/builder:16-wine-$DATE" docker/wine +docker build --build-arg IMAGE_VERSION=16-wine-$DATE -t devalexandria/builder:16-wine-mono -t "devalexandria/builder:16-wine-mono-$DATE" docker/wine-mono +docker build --build-arg IMAGE_VERSION=16-wine-$DATE -t devalexandria/builder:16-wine-chrome -t "devalexandria/builder:16-wine-chrome-$DATE" docker/wine-chrome # Node 14 -docker build --build-arg NODE_VERSION=14.21.3 --build-arg IMAGE_VERSION=base-$DATE -t electronuserland/builder:14 -t "electronuserland/builder:14-$DATE" docker/node +docker build --build-arg NODE_VERSION=14.21.3 --build-arg IMAGE_VERSION=base-$DATE -t devalexandria/builder:14 -t "devalexandria/builder:14-$DATE" docker/node -docker build --build-arg IMAGE_VERSION=14-$DATE -t electronuserland/builder:14-wine -t "electronuserland/builder:14-wine-$DATE" docker/wine -docker build --build-arg IMAGE_VERSION=14-wine-$DATE -t electronuserland/builder:14-wine-mono -t "electronuserland/builder:14-wine-mono-$DATE" docker/wine-mono -docker build --build-arg IMAGE_VERSION=14-wine-$DATE -t electronuserland/builder:14-wine-chrome -t "electronuserland/builder:14-wine-chrome-$DATE" docker/wine-chrome +docker build --build-arg IMAGE_VERSION=14-$DATE -t devalexandria/builder:14-wine -t "devalexandria/builder:14-wine-$DATE" docker/wine +docker build --build-arg IMAGE_VERSION=14-wine-$DATE -t devalexandria/builder:14-wine-mono -t "devalexandria/builder:14-wine-mono-$DATE" docker/wine-mono +docker build --build-arg IMAGE_VERSION=14-wine-$DATE -t devalexandria/builder:14-wine-chrome -t "devalexandria/builder:14-wine-chrome-$DATE" docker/wine-chrome From a851b224c07bec8bc46cb941bc5d6165d49794be Mon Sep 17 00:00:00 2001 From: Nicolas Baccelli Date: Tue, 9 Jul 2024 10:42:31 +0200 Subject: [PATCH 2/4] Typo fix Remove ref to private docker repo --- docker/build.sh | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docker/build.sh b/docker/build.sh index af9afa04106..20721b4bb0f 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -4,34 +4,34 @@ set -ex DATE=$(date +%m.%y) -docker build -t devalexandria/builder:base -t "devalexandria/builder:base-$DATE" docker/base +docker build -t electronuserland/builder:base -t "electronuserland/builder:base-$DATE" docker/base ## NOTE: Order the latest to oldest versions. The most recent node LTS should be tagged as the latest image # Node 20 -docker build --build-arg NODE_VERSION=20.9.0 --build-arg IMAGE_VERSION=base-$DATE -t devalexandria/builder:20 -t "devalexandria/builder:20-$DATE" -t devalexandria/builder:latest docker/node +docker build --build-arg NODE_VERSION=20.9.0 --build-arg IMAGE_VERSION=base-$DATE -t electronuserland/builder:20 -t "electronuserland/builder:20-$DATE" -t electronuserland/builder:latest docker/node -docker build --build-arg IMAGE_VERSION=20-$DATE -t devalexandria/builder:20-wine -t "devalexandria/builder:20-wine-$DATE" -t devalexandria/builder:wine docker/wine -docker build --build-arg IMAGE_VERSION=20-wine-$DATE -t devalexandria/builder:20-wine-mono -t "devalexandria/builder:20-wine-mono-$DATE" -t devalexandria/builder:wine-mono docker/wine-mono -docker build --build-arg IMAGE_VERSION=20-wine-$DATE -t devalexandria/builder:20-wine-chrome -t "devalexandria/builder:20-wine-chrome-$DATE" -t devalexandria/builder:wine-chrome docker/wine-chrome +docker build --build-arg IMAGE_VERSION=20-$DATE -t electronuserland/builder:20-wine -t "electronuserland/builder:20-wine-$DATE" -t electronuserland/builder:wine docker/wine +docker build --build-arg IMAGE_VERSION=20-wine-$DATE -t electronuserland/builder:20-wine-mono -t "electronuserland/builder:20-wine-mono-$DATE" -t electronuserland/builder:wine-mono docker/wine-mono +docker build --build-arg IMAGE_VERSION=20-wine-$DATE -t electronuserland/builder:20-wine-chrome -t "electronuserland/builder:20-wine-chrome-$DATE" -t electronuserland/builder:wine-chrome docker/wine-chrome # Node 18 -docker build --build-arg NODE_VERSION=18.18.2 --build-arg IMAGE_VERSION=base-$DATE -t devalexandria/builder:18 -t "devalexandria/builder:18-$DATE" -t devalexandria/builder:latest docker/node +docker build --build-arg NODE_VERSION=18.18.2 --build-arg IMAGE_VERSION=base-$DATE -t electronuserland/builder:18 -t "electronuserland/builder:18-$DATE" -t electronuserland/builder:latest docker/node -docker build --build-arg IMAGE_VERSION=18-$DATE -t devalexandria/builder:18-wine -t "devalexandria/builder:18-wine-$DATE" -t devalexandria/builder:wine docker/wine -docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t devalexandria/builder:18-wine-mono -t "devalexandria/builder:18-wine-mono-$DATE" -t devalexandria/builder:wine-mono docker/wine-mono -docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t devalexandria/builder:18-wine-chrome -t "devalexandria/builder:18-wine-chrome-$DATE" -t devalexandria/builder:wine-chrome docker/wine-chrome +docker build --build-arg IMAGE_VERSION=18-$DATE -t electronuserland/builder:18-wine -t "electronuserland/builder:18-wine-$DATE" -t electronuserland/builder:wine docker/wine +docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t electronuserland/builder:18-wine-mono -t "electronuserland/builder:18-wine-mono-$DATE" -t electronuserland/builder:wine-mono docker/wine-mono +docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t electronuserland/builder:18-wine-chrome -t "electronuserland/builder:18-wine-chrome-$DATE" -t electronuserland/builder:wine-chrome docker/wine-chrome # Node 16 -docker build --build-arg NODE_VERSION=16.20.2 --build-arg IMAGE_VERSION=base-$DATE -t devalexandria/builder:16 -t "devalexandria/builder:16-$DATE" docker/node +docker build --build-arg NODE_VERSION=16.20.2 --build-arg IMAGE_VERSION=base-$DATE -t electronuserland/builder:16 -t "electronuserland/builder:16-$DATE" docker/node -docker build --build-arg IMAGE_VERSION=16-$DATE -t devalexandria/builder:16-wine -t "devalexandria/builder:16-wine-$DATE" docker/wine -docker build --build-arg IMAGE_VERSION=16-wine-$DATE -t devalexandria/builder:16-wine-mono -t "devalexandria/builder:16-wine-mono-$DATE" docker/wine-mono -docker build --build-arg IMAGE_VERSION=16-wine-$DATE -t devalexandria/builder:16-wine-chrome -t "devalexandria/builder:16-wine-chrome-$DATE" docker/wine-chrome +docker build --build-arg IMAGE_VERSION=16-$DATE -t electronuserland/builder:16-wine -t "electronuserland/builder:16-wine-$DATE" docker/wine +docker build --build-arg IMAGE_VERSION=16-wine-$DATE -t electronuserland/builder:16-wine-mono -t "electronuserland/builder:16-wine-mono-$DATE" docker/wine-mono +docker build --build-arg IMAGE_VERSION=16-wine-$DATE -t electronuserland/builder:16-wine-chrome -t "electronuserland/builder:16-wine-chrome-$DATE" docker/wine-chrome # Node 14 -docker build --build-arg NODE_VERSION=14.21.3 --build-arg IMAGE_VERSION=base-$DATE -t devalexandria/builder:14 -t "devalexandria/builder:14-$DATE" docker/node +docker build --build-arg NODE_VERSION=14.21.3 --build-arg IMAGE_VERSION=base-$DATE -t electronuserland/builder:14 -t "electronuserland/builder:14-$DATE" docker/node -docker build --build-arg IMAGE_VERSION=14-$DATE -t devalexandria/builder:14-wine -t "devalexandria/builder:14-wine-$DATE" docker/wine -docker build --build-arg IMAGE_VERSION=14-wine-$DATE -t devalexandria/builder:14-wine-mono -t "devalexandria/builder:14-wine-mono-$DATE" docker/wine-mono -docker build --build-arg IMAGE_VERSION=14-wine-$DATE -t devalexandria/builder:14-wine-chrome -t "devalexandria/builder:14-wine-chrome-$DATE" docker/wine-chrome +docker build --build-arg IMAGE_VERSION=14-$DATE -t electronuserland/builder:14-wine -t "electronuserland/builder:14-wine-$DATE" docker/wine +docker build --build-arg IMAGE_VERSION=14-wine-$DATE -t electronuserland/builder:14-wine-mono -t "electronuserland/builder:14-wine-mono-$DATE" docker/wine-mono +docker build --build-arg IMAGE_VERSION=14-wine-$DATE -t electronuserland/builder:14-wine-chrome -t "electronuserland/builder:14-wine-chrome-$DATE" docker/wine-chrome From 8e04b1432cf2c830f9e887dd6dbe4a134628424b Mon Sep 17 00:00:00 2001 From: Nicolas Baccelli Date: Wed, 10 Jul 2024 15:57:30 +0200 Subject: [PATCH 3/4] Update latest version to node20 Use node 10 in package.json --- docker/build.sh | 4 +--- package.json | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docker/build.sh b/docker/build.sh index 20721b4bb0f..b6e9859dbd1 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -9,15 +9,13 @@ docker build -t electronuserland/builder:base -t "electronuserland/builder:base- ## NOTE: Order the latest to oldest versions. The most recent node LTS should be tagged as the latest image # Node 20 -docker build --build-arg NODE_VERSION=20.9.0 --build-arg IMAGE_VERSION=base-$DATE -t electronuserland/builder:20 -t "electronuserland/builder:20-$DATE" -t electronuserland/builder:latest docker/node +docker build --build-arg NODE_VERSION=20.15.1 --build-arg IMAGE_VERSION=base-$DATE -t electronuserland/builder:20 -t "electronuserland/builder:20-$DATE" -t electronuserland/builder:latest docker/node docker build --build-arg IMAGE_VERSION=20-$DATE -t electronuserland/builder:20-wine -t "electronuserland/builder:20-wine-$DATE" -t electronuserland/builder:wine docker/wine docker build --build-arg IMAGE_VERSION=20-wine-$DATE -t electronuserland/builder:20-wine-mono -t "electronuserland/builder:20-wine-mono-$DATE" -t electronuserland/builder:wine-mono docker/wine-mono docker build --build-arg IMAGE_VERSION=20-wine-$DATE -t electronuserland/builder:20-wine-chrome -t "electronuserland/builder:20-wine-chrome-$DATE" -t electronuserland/builder:wine-chrome docker/wine-chrome # Node 18 -docker build --build-arg NODE_VERSION=18.18.2 --build-arg IMAGE_VERSION=base-$DATE -t electronuserland/builder:18 -t "electronuserland/builder:18-$DATE" -t electronuserland/builder:latest docker/node - docker build --build-arg IMAGE_VERSION=18-$DATE -t electronuserland/builder:18-wine -t "electronuserland/builder:18-wine-$DATE" -t electronuserland/builder:wine docker/wine docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t electronuserland/builder:18-wine-mono -t "electronuserland/builder:18-wine-mono-$DATE" -t electronuserland/builder:wine-mono docker/wine-mono docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t electronuserland/builder:18-wine-chrome -t "electronuserland/builder:18-wine-chrome-$DATE" -t electronuserland/builder:wine-chrome docker/wine-chrome diff --git a/package.json b/package.json index de47ac3dda3..d873fcbf828 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "///": "Please see https://github.com/electron-userland/electron-builder/blob/master/CONTRIBUTING.md#run-test-using-cli how to run particular test instead full (and very slow) run", "test": "node ./test/out/helpers/runTests.js skipArtifactPublisher", "test-all": "pnpm compile && pnpm pretest && pnpm ci:test", - "test-linux": "docker run --rm -e DEBUG=${DEBUG:-} -e UPDATE_SNAPSHOT=${UPDATE_SNAPSHOT:-false} -e TEST_FILES=\"${TEST_FILES:-HoistedNodeModuleTest}\" -v $(pwd):/project -v $(pwd)-node-modules:/project/node_modules -v $HOME/Library/Caches/electron:/root/.cache/electron -v $HOME/Library/Caches/electron-builder:/root/.cache/electron-builder electronuserland/builder:18-wine-mono /bin/bash -c \"pnpm install && node ./test/out/helpers/runTests.js\"", + "test-linux": "docker run --rm -e DEBUG=${DEBUG:-} -e UPDATE_SNAPSHOT=${UPDATE_SNAPSHOT:-false} -e TEST_FILES=\"${TEST_FILES:-HoistedNodeModuleTest}\" -v $(pwd):/project -v $(pwd)-node-modules:/project/node_modules -v $HOME/Library/Caches/electron:/root/.cache/electron -v $HOME/Library/Caches/electron-builder:/root/.cache/electron-builder electronuserland/builder:20-wine-mono /bin/bash -c \"pnpm install && node ./test/out/helpers/runTests.js\"", "test-update": "UPDATE_SNAPSHOT=true pnpm test-all", "docker-images": "docker/build.sh", "docker-push": "docker/push.sh", From ea1cbae280823859b6f62d0be20785df2ee7cdc8 Mon Sep 17 00:00:00 2001 From: Nicolas Baccelli Date: Fri, 12 Jul 2024 10:07:27 +0200 Subject: [PATCH 4/4] Apply patch for node20 integration Thanks to @mmaietta --- docker/build.sh | 6 +++--- docker/node/Dockerfile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/build.sh b/docker/build.sh index b6e9859dbd1..25c2dd10239 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -16,9 +16,9 @@ docker build --build-arg IMAGE_VERSION=20-wine-$DATE -t electronuserland/builder docker build --build-arg IMAGE_VERSION=20-wine-$DATE -t electronuserland/builder:20-wine-chrome -t "electronuserland/builder:20-wine-chrome-$DATE" -t electronuserland/builder:wine-chrome docker/wine-chrome # Node 18 -docker build --build-arg IMAGE_VERSION=18-$DATE -t electronuserland/builder:18-wine -t "electronuserland/builder:18-wine-$DATE" -t electronuserland/builder:wine docker/wine -docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t electronuserland/builder:18-wine-mono -t "electronuserland/builder:18-wine-mono-$DATE" -t electronuserland/builder:wine-mono docker/wine-mono -docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t electronuserland/builder:18-wine-chrome -t "electronuserland/builder:18-wine-chrome-$DATE" -t electronuserland/builder:wine-chrome docker/wine-chrome +docker build --build-arg NODE_VERSION=18.18.2 --build-arg IMAGE_VERSION=18-$DATE -t electronuserland/builder:18-wine -t "electronuserland/builder:18-wine-$DATE" docker/wine +docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t electronuserland/builder:18-wine-mono -t "electronuserland/builder:18-wine-mono-$DATE" docker/wine-mono +docker build --build-arg IMAGE_VERSION=18-wine-$DATE -t electronuserland/builder:18-wine-chrome -t "electronuserland/builder:18-wine-chrome-$DATE" docker/wine-chrome # Node 16 docker build --build-arg NODE_VERSION=16.20.2 --build-arg IMAGE_VERSION=base-$DATE -t electronuserland/builder:16 -t "electronuserland/builder:16-$DATE" docker/node diff --git a/docker/node/Dockerfile b/docker/node/Dockerfile index 27be3ea4ea6..4318aa0705e 100644 --- a/docker/node/Dockerfile +++ b/docker/node/Dockerfile @@ -1,7 +1,7 @@ ARG IMAGE_VERSION=base FROM electronuserland/builder:$IMAGE_VERSION -ARG NODE_VERSION 18.18.2 +ARG NODE_VERSION 20.15.1 # this package is used for snapcraft and we should not clear apt list - to avoid apt-get update during snap build RUN curl -L https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz | tar xz -C /usr/local --strip-components=1 && \