PostgreSQLContainer class

Inheritance

Properties

config → PostgreSQLContainerConfig
final
containerPorts → List<int>
List of container ports.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
hostPorts → List<int>
List of host ports.
no setterinherited
id → String?
ID of the Docker container.
no setterinherited
instanceID → int
Dart instance ID.
no setterinherited
isReady → bool
Returns true if this container is started and ready.
no setterinherited
isReused → bool
Returns true if this container was already running and was reused (see DockerRunOptions.reuse).
no setterinherited
isRunning → bool
Returns true if this containers is running.
no setterinherited
name → String
Name of the Docker container.
no setterinherited
ports → List<String>
List of mapped ports.
no setterinherited
portsAsPair → List<Pair<int>>
List of mapped ports as Pair<int> (host port, container port). A port bound to an IP (ip:hostPort:containerPort) ignores the IP.
no setterinherited
runner → DockerRunner
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stderr → Output?
The STDERR of the container.
no setterinherited
stdout → Output?
The STDOUT of the container.
no setterinherited

Methods

appendFileContent(String filePath, String content, {bool sudo = false}) → Future<bool>
Append to the file filePath with content, inside this container.
inherited
catLogs({bool stderr = false, Pattern? waitDataMatcher, Duration? waitDataTimeout, bool waitExit = false, int? desiredExitCode, bool follow = false}) → Future<String?>
Returns this Container logs as String.
inherited
copyFileFromContainer(String containerFilePath, String hostFilePath) → Future<bool>
Copy a file inside this container, with path containerFilePath, to the host machine, at hostFilePath.
inherited
copyFileToContainer(String hostFilePath, String containerFilePath) → Future<bool>
Copy a host file, at hostFilePath, inside this container, with internal file path containerFilePath.
inherited
exec(String command, List<String> args, {bool outputAsLines = true, int? outputLimit, OutputReadyFunction? stdoutReadyFunction, OutputReadyFunction? stderrReadyFunction, OutputReadyType? outputReadyType}) → Future<DockerProcess?>?
Executes a command inside this container with args (if isRunning or returns null).
inherited
execAndWaitExit(String command, List<String> args) → Future<int?>
Calls exec than waitExit.
inherited
execAndWaitStderr(String command, List<String> args, {int? desiredExitCode}) → Future<Output?>
Calls exec than waitStderr.
inherited
execAndWaitStderrAsString(String command, List<String> args, {bool trim = false, int? desiredExitCode}) → Future<String?>
Calls execAndWaitStderrAsString and returns Output.asString.
inherited
execAndWaitStdout(String command, List<String> args, {int? desiredExitCode}) → Future<Output?>
Calls exec than waitStdout.
inherited
execAndWaitStdoutAsString(String command, List<String> args, {bool trim = false, int? desiredExitCode}) → Future<String?>
Calls execAndWaitStdoutAsString and returns Output.asString.
inherited
execCat(String filePath, {bool trim = false}) → Future<String?>
Call POSIX cat command. Calls exec with command cat and args filePath. Returns the executable path for filePath.
inherited
execShell(String script, {bool sudo = false}) → Future<DockerProcess?>
Executes a shell script. Tries to use bash or sh. Note that script should be inline, without line breaks (\n).
inherited
execWhich(String commandName, {bool ignoreCache = false, String? def}) → Future<String?>
Call POSIX which command. Calls exec with command which and args commandName. Caches response than returns the executable path for commandName.
inherited
healthStatus() → Future<String?>
Returns the health status of this container (starting, healthy or unhealthy), or null if it has no health check.
inherited
hostPortFor(int containerPort) → int?
The host port mapped to containerPort, or null if not published.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openLogs(String containerNameOrID) → Future<DockerProcess?>
Opens this Container logs:
inherited
psqlCMD(String cmdInline) → Future<String?>
Runs a psql command. Note that cmdInline should be a inline String, without line-breaks (\n).
putFileContent(String filePath, String content, {bool sudo = false, bool append = false}) → Future<bool>
Save the file filePath with content, inside this container.
inherited
runSQL(String sqlInline) → Future<String?>
Runs a SQL. Note that sqlInline should be a inline String, without line-breaks (\n).
runSQLScript(String sql) → Future<String?>
Runs a SQL script of any size, with line-breaks and quotes.
stop({Duration? timeout}) → Future<bool>
Stops this container.
inherited
toString() → String
A string representation of this object.
inherited
waitExit() → Future<int?>
Waits container to exit. Returns the process exit code.
inherited
waitHealthy({Duration? timeout, Duration interval = const Duration(milliseconds: 250)}) → Future<bool>
Waits for this container's health check to report healthy. Returns false if it reports unhealthy, has no health check, or timeout (default: 1 minute) passes.
inherited
waitReady() → Future<bool>
Waits for the container, ensuring that is started.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

scriptChunkSize → const int
The largest piece of a script (in UTF-16 code units) written with one putFileContent: it travels base64-encoded in a single command-line argument, which Linux limits to 128 KiB. 24 Ki code units are at most 72 KiB of UTF-8, 96 KiB in base64.