Change the worker command to make import work

This commit is contained in:
M. Mert Yildiran 2022-12-28 02:45:46 +03:00
parent 7c81369e1a
commit 17f9858e6e
No known key found for this signature in database
GPG Key ID: DA5D6DCBB758A461

View File

@ -153,7 +153,7 @@ func createAndStartContainers(
return
}
cmdWorker := []string{"-i", "any", "-port", fmt.Sprintf("%d", config.Config.Tap.Worker.DstPort)}
cmdWorker := []string{"-f", "./import", "-port", fmt.Sprintf("%d", config.Config.Tap.Worker.DstPort)}
if config.DebugMode {
cmdWorker = append(cmdWorker, fmt.Sprintf("-%s", config.DebugFlag))
}
@ -167,11 +167,11 @@ func createAndStartContainers(
return
}
if err = cli.ContainerStart(ctx, respWorker.ID, types.ContainerStartOptions{}); err != nil {
if err = cli.CopyToContainer(ctx, respWorker.ID, "/app/import", pcapReader, types.CopyToContainerOptions{}); err != nil {
return
}
if err = cli.CopyToContainer(ctx, respWorker.ID, "/app/import", pcapReader, types.CopyToContainerOptions{}); err != nil {
if err = cli.ContainerStart(ctx, respWorker.ID, types.ContainerStartOptions{}); err != nil {
return
}