Skip to content
Merged
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
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- [NPM](#npm)
- [Visual Studio Code Extension](#visual-studio-code-extension)
- [DockerHub](#dockerhub)
- [Testcontainers](#testcontainers)
- [Docker Compose](#docker-compose)
- [NuGet](#nuget)
- [Visual Studio](#visual-studio)
Expand Down Expand Up @@ -291,6 +292,48 @@ Above command will try to start Azurite image with configurations:

> Will support more release channels for Azurite V3 in the future.

#### Testcontainers

When using Testcontainers, pass `--skipApiVersionCheck` through the container command configuration.
Comment thread
jainakanksha-msft marked this conversation as resolved.

For .NET, use the [Azurite module](https://testcontainers.com/modules/azurite/) with [`WithCommand`](https://dotnet.testcontainers.org/api/create_docker_container/#configure-container-start), including the Azurite host bindings:

```csharp
using Testcontainers.Azurite;

AzuriteContainer azurite = new AzuriteBuilder("mcr.microsoft.com/azure-storage/azurite:latest")
.WithCommand(
"--blobHost",
Comment thread
jainakanksha-msft marked this conversation as resolved.
"0.0.0.0",
"--queueHost",
"0.0.0.0",
"--tableHost",
"0.0.0.0",
"--skipApiVersionCheck")
.Build();
```

> `AzuriteBuilder` already configures the container's entrypoint as `azurite`, so `WithCommand` only needs the flags, not the `azurite` executable name.

For Java, use [`GenericContainer.withCommand`](https://java.testcontainers.org/features/commands/#container-startup-command) and include the Azurite command, the `-l /data` persistence path, and the host bindings, since `withCommand` replaces the image's entire default command:

```java
GenericContainer<?> azurite =
new GenericContainer<>(DockerImageName.parse("mcr.microsoft.com/azure-storage/azurite:latest"))
.withExposedPorts(10000, 10001, 10002)
.withCommand(
"azurite",
"-l",
"/data",
"--blobHost",
"0.0.0.0",
"--queueHost",
"0.0.0.0",
"--tableHost",
"0.0.0.0",
"--skipApiVersionCheck");
```

#### Docker Compose

To run Azurite in Docker Compose, you can start with the following configuration:
Expand Down
Loading