self-update no longer fails at the updater step on baseline (old x86_64) images
This commit is contained in:
4 files changed
+63
-1
No files matched your search
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Which dockhand-updater sidecar image self-update should launch.
|
||||
*
|
||||
* The default updater is Wolfi-based (compiled for x86-64-v2). On old x86_64 CPUs
|
||||
* without v2 - the same hardware that runs the baseline Dockhand image
|
||||
* (DOCKHAND_VARIANT=baseline) - the Wolfi updater can't exec and Docker reports exit
|
||||
* 127 at "Launching updater", so self-update is broken. Those hosts must pull the
|
||||
* `-baseline` (Alpine/musl) updater instead, mirroring the backup helper's variant
|
||||
* split (see restic.ts HELPER_VARIANT_SUFFIX).
|
||||
*/
|
||||
export function updaterImageForVariant(variant: string | undefined): string {
|
||||
const suffix = variant === 'baseline' ? '-baseline' : '';
|
||||
return `fnsys/dockhand-updater:latest${suffix}`;
|
||||
}
|
||||
@@ -12,8 +12,12 @@ import {
|
||||
import { buildRegistryAuthHeader, unixSocketRequest, unixSocketStreamRequest } from '$lib/server/docker';
|
||||
import type { RequestHandler } from './$types';
|
||||
import { prefersJSON, sseToJSON } from '$lib/server/sse';
|
||||
import { updaterImageForVariant } from '$lib/server/updater-image-core';
|
||||
|
||||
const UPDATER_IMAGE = 'fnsys/dockhand-updater:latest';
|
||||
// Baseline Dockhand (old x86_64 without v2) needs the Alpine/musl updater; the Wolfi
|
||||
// default can't exec there (exit 127 at "Launching updater"). Mirrors the backup
|
||||
// helper's variant split.
|
||||
const UPDATER_IMAGE = updaterImageForVariant(process.env.DOCKHAND_VARIANT);
|
||||
const UPDATER_LABEL = 'dockhand.updater';
|
||||
|
||||
/** Get TCP Docker host if configured, null otherwise. */
|
||||
|
||||
Reference in new issue
Block a user