A collection of +180 reusable WebAssembly modules for building composable CI/CD pipelines with FluentCI fluentci.io/modules
modules containers docker COMPONENT.md
8.5 kB · 143 lines
Markdown
at main

docker component functions #

Requires FluentCI v0.17.3 or newer. The compiler derives native WIT signatures and embedded help from these typed PureScript functions. Optional arguments may be omitted.

run #

Execute arbitrary literal CLI arguments.

Argument Type Required Description
project string no Working directory containing the source checkout; defaults to the current directory. Default: ".".
run-dir string yes Fresh directory for this invocation’s execution report and task logs; must not already exist.
executable string no Native CLI executable name or absolute path; defaults to this operation’s tool.
timeout-ms integer no Maximum task duration in milliseconds; defaults to 900000. Default: 900000.
artifacts array no Output artifacts to collect as NAME=PATH entries; names must be unique.
arguments array yes Literal native CLI argument tokens, passed without shell expansion.

Returns Contract.ExecutionResult.

version #

Print the CLI version.

Argument Type Required Description
project string no Working directory containing the source checkout; defaults to the current directory. Default: ".".
run-dir string yes Fresh directory for this invocation’s execution report and task logs; must not already exist.
executable string no Native CLI executable name or absolute path; defaults to this operation’s tool.
timeout-ms integer no Maximum task duration in milliseconds; defaults to 900000. Default: 900000.
artifacts array no Output artifacts to collect as NAME=PATH entries; names must be unique.

Returns Contract.ExecutionResult.

build #

Build an image from a context.

Argument Type Required Description
project string no Working directory containing the source checkout; defaults to the current directory. Default: ".".
run-dir string yes Fresh directory for this invocation’s execution report and task logs; must not already exist.
executable string no Native CLI executable name or absolute path; defaults to this operation’s tool.
timeout-ms integer no Maximum task duration in milliseconds; defaults to 900000. Default: 900000.
artifacts array no Output artifacts to collect as NAME=PATH entries; names must be unique.
tag array no Tag supplied to the docker build operation.
file string no File supplied to the docker build operation.
build-arg array no Build Arg supplied to the docker build operation.
target string no Target selected for this native operation.
platform string no Platform supplied to the docker build operation.
no-cache boolean no No Cache supplied to the docker build operation.
pull boolean no Pull supplied to the docker build operation.
context string no Context supplied to the docker build operation. Default: ".".

Returns Contract.ExecutionResult.

pull #

Pull an image.

Argument Type Required Description
project string no Working directory containing the source checkout; defaults to the current directory. Default: ".".
run-dir string yes Fresh directory for this invocation’s execution report and task logs; must not already exist.
executable string no Native CLI executable name or absolute path; defaults to this operation’s tool.
timeout-ms integer no Maximum task duration in milliseconds; defaults to 900000. Default: 900000.
artifacts array no Output artifacts to collect as NAME=PATH entries; names must be unique.
platform string no Platform supplied to the docker pull operation.
image string yes Image supplied to the docker pull operation.

Returns Contract.ExecutionResult.

push #

Push an authenticated image reference.

Argument Type Required Description
project string no Working directory containing the source checkout; defaults to the current directory. Default: ".".
run-dir string yes Fresh directory for this invocation’s execution report and task logs; must not already exist.
executable string no Native CLI executable name or absolute path; defaults to this operation’s tool.
timeout-ms integer no Maximum task duration in milliseconds; defaults to 900000. Default: 900000.
artifacts array no Output artifacts to collect as NAME=PATH entries; names must be unique.
image string yes Image supplied to the docker push operation.

Returns Contract.ExecutionResult.

tag #

Create an image tag.

Argument Type Required Description
project string no Working directory containing the source checkout; defaults to the current directory. Default: ".".
run-dir string yes Fresh directory for this invocation’s execution report and task logs; must not already exist.
executable string no Native CLI executable name or absolute path; defaults to this operation’s tool.
timeout-ms integer no Maximum task duration in milliseconds; defaults to 900000. Default: 900000.
artifacts array no Output artifacts to collect as NAME=PATH entries; names must be unique.
source string yes Source supplied to the docker tag operation.
target string yes Target selected for this native operation.

Returns Contract.ExecutionResult.

container-run #

Run an image with optional command arguments.

Argument Type Required Description
project string no Working directory containing the source checkout; defaults to the current directory. Default: ".".
run-dir string yes Fresh directory for this invocation’s execution report and task logs; must not already exist.
executable string no Native CLI executable name or absolute path; defaults to this operation’s tool.
timeout-ms integer no Maximum task duration in milliseconds; defaults to 900000. Default: 900000.
artifacts array no Output artifacts to collect as NAME=PATH entries; names must be unique.
rm boolean no Rm supplied to the docker container_run operation.
detach boolean no Detach supplied to the docker container_run operation.
name string no Name supplied to the docker container_run operation.
publish array no Publish supplied to the docker container_run operation.
volume array no Volume supplied to the docker container_run operation.
env array no Env supplied to the docker container_run operation.
network string no Network supplied to the docker container_run operation.
workdir string no Workdir supplied to the docker container_run operation.
image string yes Image supplied to the docker container_run operation.
command array no Command supplied to the docker container_run operation. Default: [].

Returns Contract.ExecutionResult.

compose #

Run Compose with its native subcommand arguments.

Argument Type Required Description
project string no Working directory containing the source checkout; defaults to the current directory. Default: ".".
run-dir string yes Fresh directory for this invocation’s execution report and task logs; must not already exist.
executable string no Native CLI executable name or absolute path; defaults to this operation’s tool.
timeout-ms integer no Maximum task duration in milliseconds; defaults to 900000. Default: 900000.
artifacts array no Output artifacts to collect as NAME=PATH entries; names must be unique.
file array no File supplied to the docker compose operation.
project-name string no Project Name supplied to the docker compose operation.
arguments array yes Literal native CLI argument tokens, passed without shell expansion.

Returns Contract.ExecutionResult.