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:
@@ -124,6 +124,17 @@ export const initializeTraefik = async ({
|
|||||||
console.log("No existing container to remove");
|
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
|
// Create and start the new container
|
||||||
try {
|
try {
|
||||||
await docker.createContainer(settings);
|
await docker.createContainer(settings);
|
||||||
|
|||||||
Reference in New Issue
Block a user