# `Testcontainers.DatabaseBehaviour`
[🔗](https://github.com/testcontainers/testcontainers-elixir/blob/main/lib/container/behaviours/database.ex#L1)

A behaviour implemented by database containers used by `Testcontainers.Ecto`

# `t`

```elixir
@type t() :: %{
  :image =&gt; String.t(),
  :user =&gt; String.t(),
  :password =&gt; String.t(),
  :database =&gt; String.t(),
  :port =&gt; integer() | {integer(), integer()},
  optional(atom()) =&gt; any()
}
```

# `new`

```elixir
@callback new() :: t()
```

# `with_database`

```elixir
@callback with_database(t(), String.t()) :: t()
```

# `with_image`

```elixir
@callback with_image(t(), String.t()) :: t()
```

# `with_password`

```elixir
@callback with_password(t(), String.t()) :: t()
```

# `with_persistent_volume`

```elixir
@callback with_persistent_volume(t(), binary()) :: t()
```

# `with_port`

```elixir
@callback with_port(t(), integer() | {integer(), integer()}) :: t()
```

# `with_user`

```elixir
@callback with_user(t(), String.t()) :: t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
