mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix(traefik-setup): now pulling the traefik image to make it sure it's present locally
This commit is contained in:
parent
1089a8247d
commit
9f146d7d80
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user