You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Testcontainers.KurrentDb/KurrentDbBuilder.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ public KurrentDbBuilder()
22
22
/// </summary>
23
23
/// <param name="image">Docker image tag. Available tags can be found here: <see href="https://hub.docker.com/r/kurrentplatform/kurrentdb/tags">https://hub.docker.com/r/kurrentplatform/kurrentdb/tags</see>.</param>
Copy file name to clipboardExpand all lines: tests/Testcontainers.Commons/TestSession.cs
+31-8Lines changed: 31 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -12,17 +12,40 @@ static TestSession()
12
12
13
13
publicstaticIImageGetImageFromDockerfile(
14
14
stringrelativePath="Dockerfile",
15
-
intlineIndex=0)
15
+
stringstage="")
16
16
{
17
17
varfullpath=Path.GetFullPath(relativePath);
18
18
if(!File.Exists(fullpath))thrownewException($"Dockerfile not found at '{fullpath}'.");
19
19
varlines=File.ReadAllLines(fullpath);
20
-
if(lines.Length==0||lines.Length<=lineIndex)thrownewException($"Dockerfile located at '{fullpath}' is empty or shorter than {lineIndex+1} line(s).");
21
-
varimageLine=lines[lineIndex];
22
-
varimageLineSplit=imageLine.Split(" ");
23
-
if(imageLineSplit.Length<2)thrownewException($"Dockerfile located at '{fullpath}' has invalid image tag at line {lineIndex+1}. The line should start with 'FROM' instruction, followed by space and image tag. For example: 'FROM postgres:17'.");
24
-
varimageTag=imageLineSplit[1];
25
-
varimage=newDockerImage(imageTag);
26
-
returnimage;
20
+
if(lines.Length==0)thrownewException($"Dockerfile located at '{fullpath}' is empty.");
0 commit comments