Commit d7d64ff

Anton Golub <antongolub@antongolub.com>
2025-06-22 17:50:29
chore: update docker base image to node:24-alpine (#1239)
1 parent 4967622
Changed files (3)
dcr/Dockerfile
@@ -1,4 +1,4 @@
-FROM node:22-alpine
+FROM node:24-alpine
 
 RUN apk add --no-cache bash
 
docs/setup.md
@@ -89,7 +89,7 @@ npm i --registry=https://npm.pkg.github.com @google/zx
 
 ### Docker
 If you'd prefer to run scripts in a container, you can pull the zx image from the [ghcr.io](https://ghcr.io).
-[node:22-alpine](https://hub.docker.com/_/node) is used as [a base](https://github.com/google/zx/blob/main/dcr/Dockerfile).
+[node:24-alpine](https://hub.docker.com/_/node) is used as [a base](https://github.com/google/zx/blob/main/dcr/Dockerfile).
 
 ```shell
 docker pull ghcr.io/google/zx:8.5.0
test/it/build-dcr.test.js
@@ -18,11 +18,14 @@ import assert from 'node:assert'
 
 describe('docker container', () => {
   test('works', async () => {
-    const p = $({
+    const hello = await $({
       input: 'await $({verbose: true})`echo hello`',
     })`docker run -i zx`
-    const o = await p
+    assert.equal(hello.stderr, '$ echo hello\nhello\n')
 
-    assert.equal(o.stderr, '$ echo hello\nhello\n')
+    const node = await $({
+      input: 'console.log((await $`node -v`).valueOf())',
+    })`docker run -i zx`
+    assert.match(node.stdout, /^v24\./)
   })
 })