fix(traefik-setup): now pulling the traefik image to make it sure it's present locally

This commit is contained in:
s1nyx 2025-06-11 08:06:13 +02:00
parent 1089a8247d
commit 9f146d7d80

View File

@ -124,6 +124,17 @@ export const initializeTraefik = async ({
console.log("No existing container to remove");
}
console.log(`Pulling image ${imageName}...`);
const stream = await docker.pull(imageName);
await new Promise((resolve, reject) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
docker.modem.followProgress(stream, (err: Error, res: any) =>
err ? reject(err) : resolve(res),
);
});
console.log(`Image ${imageName} pulled successfully.`);
// Create and start the new container
try {
await docker.createContainer(settings);