Skip to content

Commit

Permalink
Weaviate: Support new container registry (#8512)
Browse files Browse the repository at this point in the history
Fixes gh-8511

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
  • Loading branch information
ThomasVitale authored Apr 5, 2024
1 parent 9d6e765 commit 5969b0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* Testcontainers implementation of Weaviate.
* <p>
* Supported image: {@code semitechnologies/weaviate}
* Supported images: {@code cr.weaviate.io/semitechnologies/weaviate}, {@code semitechnologies/weaviate}
* <p>
* Exposed ports:
* <ul>
Expand All @@ -16,15 +16,19 @@
*/
public class WeaviateContainer extends GenericContainer<WeaviateContainer> {

private static final String WEAVIATE_IMAGE = "semitechnologies/weaviate";
private static final DockerImageName DEFAULT_WEAVIATE_IMAGE = DockerImageName.parse(
"cr.weaviate.io/semitechnologies/weaviate"
);

private static final DockerImageName DOCKER_HUB_WEAVIATE_IMAGE = DockerImageName.parse("semitechnologies/weaviate");

public WeaviateContainer(String dockerImageName) {
this(DockerImageName.parse(dockerImageName));
}

public WeaviateContainer(DockerImageName dockerImageName) {
super(dockerImageName);
dockerImageName.assertCompatibleWith(DockerImageName.parse(WEAVIATE_IMAGE));
dockerImageName.assertCompatibleWith(DEFAULT_WEAVIATE_IMAGE, DOCKER_HUB_WEAVIATE_IMAGE);
withExposedPorts(8080, 50051);
withEnv("AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED", "true");
withEnv("PERSISTENCE_DATA_PATH", "/var/lib/weaviate");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class WeaviateContainerTest {
@Test
public void testWeaviate() {
try ( // container {
WeaviateContainer weaviate = new WeaviateContainer("semitechnologies/weaviate:1.24.5")
WeaviateContainer weaviate = new WeaviateContainer("cr.weaviate.io/semitechnologies/weaviate:1.24.5")
// }
) {
weaviate.start();
Expand Down

0 comments on commit 5969b0f

Please sign in to comment.