Skip to content

Commit 3d5e7ff

Browse files
committed
Polish DockerModelRunnerContainer
1 parent 4e8c421 commit 3d5e7ff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/main/java/org/testcontainers/containers/DockerModelRunnerContainer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@ public class DockerModelRunnerContainer extends SocatContainer {
1515

1616
private static final String MODEL_RUNNER_ENDPOINT = "model-runner.docker.internal";
1717

18+
private static final int PORT = 80;
19+
1820
public DockerModelRunnerContainer(String image) {
1921
this(DockerImageName.parse(image));
2022
}
2123

2224
public DockerModelRunnerContainer(DockerImageName image) {
2325
super(image);
24-
withTarget(80, MODEL_RUNNER_ENDPOINT);
26+
withTarget(PORT, MODEL_RUNNER_ENDPOINT);
2527
waitingFor(Wait.forHttp("/").forResponsePredicate(res -> res.contains("The service is running")));
2628
}
2729

2830
public String getBaseEndpoint() {
29-
return "http://" + getHost() + ":" + getMappedPort(80);
31+
return "http://" + getHost() + ":" + getMappedPort(PORT);
3032
}
3133

3234
public String getOpenAIEndpoint() {

0 commit comments

Comments
 (0)