chore(dockerfile): move to distroless (#2885)

* chore(dockerfile): move to distroless
- remove unnecessary env vars (these are provided via the deployment system)
- uses relative paths if in a working directory

* Amend entrypoint for use with distroless

* Update startup probe & docker compose readiness probe
This commit is contained in:
Iain Sproat
2024-09-05 14:28:26 +01:00
committed by GitHub
parent c382aec1f4
commit a1a3428737
3 changed files with 14 additions and 20 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ services:
healthcheck:
test:
- CMD
- node
- /nodejs/bin/node
- -e
- "try { require('node:http').request({headers: {'Content-Type': 'application/json'}, port:3000, hostname:'127.0.0.1', path:'/readiness', method: 'GET', timeout: 2000 }, (res) => { body = ''; res.on('data', (chunk) => {body += chunk;}); res.on('end', () => {process.exit(res.statusCode != 200 || body.toLowerCase().includes('error'));}); }).end(); } catch { process.exit(1); }"
interval: 10s