pub struct ArangoContainer(/* private fields */);Expand description
A single-node ArangoDB container.
Implementations§
Source§impl ArangoContainer
impl ArangoContainer
Sourcepub fn new() -> Self
pub fn new() -> Self
Builds a container from the pinned default image (arangodb:3.11), with auth
disabled (ARANGO_NO_AUTH=1).
Sourcepub fn with_image(image: &str) -> Self
pub fn with_image(image: &str) -> Self
Builds a container from a caller-chosen image, with auth disabled.
Sourcepub fn with_root_password(self, password: &str) -> Self
pub fn with_root_password(self, password: &str) -> Self
Enables auth with the given root password, instead of the default no-auth
setup. ARANGO_NO_AUTH was already set by new/with_image; this call
removes it before adding ARANGO_ROOT_PASSWORD.
This removal is required, not cosmetic: the official ArangoDB entrypoint
checks ARANGO_NO_AUTH for mere presence (if [ ! -z "$ARANGO_NO_AUTH" ]; then AUTHENTICATION="false"; fi), unconditionally, near the very end of the
script, right before it execs arangod --server.authentication=$AUTHENTICATION
— this check does not care whether ARANGO_ROOT_PASSWORD is also set.
Verified directly against the real arangodb:3.11 entrypoint (docker run --entrypoint /bin/cat arangodb:3.11 /entrypoint.sh): with both vars set, the
root password gets initialized (the +x-guarded init block cares only that
ARANGO_ROOT_PASSWORD is set), but AUTHENTICATION still ends up "false"
because ARANGO_NO_AUTH is still present — auth stays off regardless of the
password, so leaving ARANGO_NO_AUTH in the spec made the password a no-op.
Sourcepub async fn start(self) -> Result<ArangoGuard>
pub async fn start(self) -> Result<ArangoGuard>
Boots the container.