direct-remote staging pulls the alpine helper image when it's missing
This commit is contained in:
1 file changed
+5
@@ -5049,6 +5049,11 @@ export async function runContainerWithStreaming(options: {
|
|||||||
containerConfig.HostConfig.Dns = options.dns;
|
containerConfig.HostConfig.Dns = options.dns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A remote daemon may not have the helper image (e.g. alpine:latest on a fresh
|
||||||
|
// direct-remote host), and /containers/create does NOT auto-pull - it 404s with
|
||||||
|
// "No such image". Pull it first so the stager/helper works out of the box (#1442).
|
||||||
|
await ensureImagePresent(options.image, options.envId);
|
||||||
|
|
||||||
const createResult = await dockerJsonRequest<{ Id: string }>(
|
const createResult = await dockerJsonRequest<{ Id: string }>(
|
||||||
`/containers/create?name=${encodeURIComponent(containerName)}`,
|
`/containers/create?name=${encodeURIComponent(containerName)}`,
|
||||||
{ method: 'POST', body: JSON.stringify(containerConfig) },
|
{ method: 'POST', body: JSON.stringify(containerConfig) },
|
||||||
|
|||||||
Reference in new issue
Block a user