fix: print docker output in network error and use networkName constant
The network creation error format string had a trailing "output" with no verb, silently dropping the captured docker output. Add the missing %s. Also replace the hardcoded "app-dono_app" literal with the networkName constant in RunAppClienteContainer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -56,7 +56,7 @@ func EnsureNetwork(name string) error {
|
||||
cmd = exec.Command("docker", "network", "create", name)
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return fmt.Errorf("erro ao criar network %s: %w\noutput", name, err, string(out))
|
||||
return fmt.Errorf("erro ao criar network %s: %w\noutput: %s", name, err, string(out))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -125,7 +125,7 @@ func RunAppClienteContainer(image, containerName, configPath, configDestinationP
|
||||
"-u", uidGid,
|
||||
"-p", fmt.Sprintf("%s:8080", cv.Server["port"]),
|
||||
"--name", containerName,
|
||||
"--network", "app-dono_app",
|
||||
"--network", networkName,
|
||||
"--restart", "unless-stopped",
|
||||
"-v", fmt.Sprintf("%s:%s", absPath, configDestinationPath),
|
||||
"-v", fmt.Sprintf("%s:/app/certs", cv.Cert["cert_dir_path"]),
|
||||
|
||||
Reference in New Issue
Block a user