Skip to content

Commit 09a6ae5

Browse files
committedFeb 9, 2024
Add support for Bitnami container images with Docker Compose
Closes gh-35759
1 parent 533f6c3 commit 09a6ae5

File tree

50 files changed

+993
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+993
-65
lines changed
 

‎spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraDockerComposeConnectionDetailsFactory.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,10 +32,12 @@
3232
class CassandraDockerComposeConnectionDetailsFactory
3333
extends DockerComposeConnectionDetailsFactory<CassandraConnectionDetails> {
3434

35+
private static final String[] CASSANDRA_CONTAINER_NAMES = { "cassandra", "bitnami/cassandra" };
36+
3537
private static final int CASSANDRA_PORT = 9042;
3638

3739
CassandraDockerComposeConnectionDetailsFactory() {
38-
super("cassandra");
40+
super(CASSANDRA_CONTAINER_NAMES);
3941
}
4042

4143
@Override

‎spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraEnvironment.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ class CassandraEnvironment {
2828
private final String datacenter;
2929

3030
CassandraEnvironment(Map<String, String> env) {
31-
this.datacenter = env.getOrDefault("CASSANDRA_DC", "datacenter1");
31+
this.datacenter = env.getOrDefault("CASSANDRA_DC", env.getOrDefault("CASSANDRA_DATACENTER", "datacenter1"));
3232
}
3333

3434
String getDatacenter() {

0 commit comments

Comments
 (0)