Skip to content

Commit 50f1464

Browse files
author
Harri Klingsten
committed
Added --restart unless-stopped when starting Dependench tracker API and the CycloneDX container.
1 parent 14c8368 commit 50f1464

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/SecTools/SecToolsCommands/Managers/CycloneDxManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ public static class CycloneDxManager
33
{
44
public static void Start(string hostMount, string containerMount, string hostPort, string containerPort, string sdxGenServerVolumeMount, string imageUrl, string serverHost)
55
{
6-
var arguments = $"run --rm -v {hostMount}:{containerMount} -p {hostPort}:{containerPort} -v {sdxGenServerVolumeMount}:/app:rw -t {imageUrl} -r /app --server --server-host {serverHost}";
6+
var arguments = $"run --rm -v {hostMount}:{containerMount} -p {hostPort}:{containerPort} -v {sdxGenServerVolumeMount}:/app:rw -t {imageUrl} -r /app --server --server-host {serverHost} --restart unless-stopped";
77
ShellService.Service.Execute("docker", arguments, "");
88
ConsoleService.Service.WriteSuccessLine(nameof(CycloneDxManager), "CycloneDX Generator server ready!");
99
}

src/SecTools/SecToolsCommands/Managers/DependencyTrackManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static async Task<string> PostSbom(string apiUrl, string sbomJson, string
2121
}
2222
public static void Start(string apiUrl, string apiServerImage, string apiServerContainer, string apiPorts, string frontendImage, string frontendContainer, string frontendPorts, string adminUrl, int startupTime)
2323
{
24-
ShellService.Service.Execute("docker", $"run -d --name {apiServerContainer} -p {apiPorts} {apiServerImage}", "");
24+
ShellService.Service.Execute("docker", $"run -d --name {apiServerContainer} -p {apiPorts} --restart unless-stopped {apiServerImage}", "");
2525
ShellService.Service.Execute("docker", $"run -d --name {frontendContainer} -e API_BASE_URL={apiUrl} -p {frontendPorts} --restart unless-stopped {frontendImage}", "");
2626
ConsoleService.Service.WriteSuccessLine(nameof(DependencyTrackManager), "Dependency Track container starting...");;
2727

src/SecTools/SecToolsCommands/Managers/DockerDesktopManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public static void StartDockerDesktop(string fullFileName, int startupTime)
55
{
66
Action<string> writer = s =>
77
{
8-
ConsoleService.Service.WriteLine(nameof(DockerDesktopManager), s);
8+
ConsoleService.Service.WriteLine(nameof(DockerDesktopManager), "babar");
99
};
1010

1111
Action<string> reader = s =>

0 commit comments

Comments
 (0)