Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/modules/minio.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

Testcontainers can be used to automatically instantiate and manage [MinIO](https://min.io) containers.

!!! note
Upstream MinIO stopped publishing free community builds in late 2025 and archived the
[minio/minio](https://github.com/minio/minio) repository in 2026; the `minio/minio` image is no longer available on
Docker Hub. The module therefore also accepts [Silo](https://github.com/pgsty/silo) (`pgsty/silo`), a
community-maintained, AGPL-licensed fork of MinIO by the [Pigsty](https://pigsty.io) project, which is used in the
examples below. See the [Silo manifesto](https://silo.pigsty.io/about/manifesto/) for background on the fork.

## Usage example

Create a `MinIOContainer` to use it in your tests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* Testcontainers implementation for MinIO.
* <p>
* Supported image: {@code minio/minio}
* Supported images: {@code minio/minio}, {@code pgsty/silo}
* <p>
* Exposed ports:
* <ul>
Expand All @@ -21,6 +21,8 @@ public class MinIOContainer extends GenericContainer<MinIOContainer> {

private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("minio/minio");

private static final DockerImageName SILO_IMAGE_NAME = DockerImageName.parse("pgsty/silo");

private static final int MINIO_S3_PORT = 9000;

private static final int MINIO_UI_PORT = 9001;
Expand All @@ -47,7 +49,7 @@ public MinIOContainer(final String dockerImageName) {
*/
public MinIOContainer(final DockerImageName dockerImageName) {
super(dockerImageName);
dockerImageName.assertCompatibleWith(DEFAULT_IMAGE_NAME);
dockerImageName.assertCompatibleWith(DEFAULT_IMAGE_NAME, SILO_IMAGE_NAME);
withExposedPorts(MINIO_S3_PORT, MINIO_UI_PORT);
withCommand("server", "--console-address", ":" + MINIO_UI_PORT, "/data");
waitingFor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class MinIOContainerTest {
void testBasicUsage() throws Exception {
try (
// minioContainer {
MinIOContainer container = new MinIOContainer("minio/minio:RELEASE.2023-09-04T19-57-37Z");
MinIOContainer container = new MinIOContainer("pgsty/silo:RELEASE.2026-09-16T00-00-00Z");
// }
) {
container.start();
Expand Down Expand Up @@ -58,7 +58,7 @@ void testBasicUsage() throws Exception {

@Test
void testDefaultUserPassword() {
try (MinIOContainer container = new MinIOContainer("minio/minio:RELEASE.2023-09-04T19-57-37Z")) {
try (MinIOContainer container = new MinIOContainer("pgsty/silo:RELEASE.2026-09-16T00-00-00Z")) {
container.start();
assertThat(container.getUserName()).isEqualTo("minioadmin");
assertThat(container.getPassword()).isEqualTo("minioadmin");
Expand All @@ -69,7 +69,7 @@ void testDefaultUserPassword() {
void testOverwriteUserPassword() {
try (
// minioOverrides {
MinIOContainer container = new MinIOContainer("minio/minio:RELEASE.2023-09-04T19-57-37Z")
MinIOContainer container = new MinIOContainer("pgsty/silo:RELEASE.2026-09-16T00-00-00Z")
.withUserName("testuser")
.withPassword("testpassword");
// }
Expand Down
Loading