Merge pull request #196 from Dokploy/fix/remove-registry-login-on-self-hosted

fix(registry): remove login on self hosted
This commit is contained in:
Mauricio Siu 2024-07-05 12:32:04 -06:00 committed by GitHub
commit 334466f28f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,8 +33,10 @@ export const createRegistry = async (input: typeof apiCreateRegistry._type) => {
});
}
const loginCommand = `echo ${input.password} | docker login ${input.registryUrl} --username ${input.username} --password-stdin`;
await execAsync(loginCommand);
if (newRegistry.registryType === "cloud") {
const loginCommand = `echo ${input.password} | docker login ${input.registryUrl} --username ${input.username} --password-stdin`;
await execAsync(loginCommand);
}
return newRegistry;
});