dockerRunContainer

Run a new container and then optionally destroys the container when complete.  Useful for running functions as containers. This operation uses Docker CLI, it requires the docker executable to be on the path of the docker endpoint.

Target Properties

Property Name

Property Code

Required

Description

Property Name

Property Code

Required

Description

Docker Unix Socket

FDDKR_UNIX_SOCKET

No

The socket the Docker daemon listens on. Required if Docker Server and Docker Port are not set. Default value is [/var/run/docker.sock]

Docker Server Address

FDDKR_DOCKER_SERVER

No

The IP address of the Docker server.

Docker Port

FDDKR_DOCKER_PORT

No

The port the Docker service is listening on.

Docker Registry Account

FDDKR_REGISTRY_ACCOUNT_CODE

No

The Docker Registry account to use. Required when docker login is needed to pull the image from a remote registry. The plugin input FDDKR_INP_REGISTRY_ACCOUNT_CODE takes precedence over this property.

Please refer to the link to set up the Docker Registry Account: Docker Registry Setup For Cloud Providers

Project Properties

Property Name

Property Code

Required

Description

Property Name

Property Code

Required

Description

Docker Repository Name

FDDKR_IMAGE_NAME

No

The Docker image use when running the container. The plugin input FDDKR_INP_IMAGE_NAME takes precedence over this property.

Docker Image Tag

FDDKR_IMAGE_TAG

No

The tag to use when running the container. The plugin input FDDKR_INP_IMAGE_TAG takes precedence over this property.

Inputs

Input Name

Input Code

Required

Description

Input Name

Input Code

Required

Description

Container Name

FDDKR_INP_CONTAINER_NAME

No

The name of the container to be created and run.

Docker Repository Name

FDDKR_INP_IMAGE_NAME

No

The Docker image use when running the container. This input will take priority over the FDDKR_IMAGE_NAME project property.

Note: If FDDKR_IMAGE_NAME or FDDKR_INP_IMAGE_NAME is specified with preceding “/”, then the registry address from FDDKR_REGISTRY_ACCOUNT_CODE or FDDKR_INP_REGISTRY_ACCOUNT_CODE will get auto prepended to form the full image name.

Example: FDDKR_INP_IMAGE_NAME=/nginximage and registry address corresponding to the FDDKR_REGISTRY_ACCOUNT_CODE is 898334.dkr.ecr.us-east-1.amazonaws.com, then plugin will consider the image name as 898334.dkr.ecr.us-east-1.amazonaws.com/nginximage.

Image Tag

FDDKR_INP_IMAGE_TAG

No

The tag to use when running the container. This input will take priority over the FDDKR_IMAGE_TAG project property.

Mount Plugin Directories

FDDKR_INP_MOUNT_PLUGIN_DIRS

No

Should the plugin execution directories be mounted as a volume? Default value is true. Volumes are mounted under the following directories in the container:

  • /fd_working_dir/temp,

  • /fd_working_dir/artifacts,

  • /fd_working_dir/object-results

  • /fd_working_dir/test-results

  • /fd_working_dir/reports

  • /fd_working_dir/transfer

  • /fd_working_dir/internal

Volumes

FDDKR_INP_VOLUMES

No

A comma separated list of volumes to attach to the container. Volume entries should be host:container.

Exposed Ports

FDDKR_INP_EXPOSED_PORTS

No

A comma separated list of ports to expose on the container and host. (e.g. 28080:8080,20022:22,[HostPort]:[ContainerPort]).

For example, if your container exposes an application on port 8080 and you want to access it externally from port 9000 you would put 9000:8080

Container Entrypoint Commands

FDDKR_INP_CONTAINER_COMMANDS

No

Csv list of entrypoint commands to pass to the container.

Wait For Exit

FDDKR_INP_WAIT_FOR_EXIT

No

If true, FlexDeploy will wait until the container has exited. Useful for containers running as functions. Default value is false.

Remove Container

FDDKR_INP_REMOVE_CONTAINER

No

Remove container after running? Default value is false. This will also remove volumes created for the container.

Network ID Or Name

FDDKR_INP_NETWORK_ID

No

The ID or name of the network. This will connect the container to the given network.

Docker Registry Account

FDDKR_INP_REGISTRY_ACCOUNT_CODE

No

The Docker Registry account to use. Required when docker login is needed to pull the image from a remote registry. There are a couple different spots to specify this for convenience.

In order of precedence:

  • This plugin input

  • Target Property

Please refer to the link to set up the Docker Registry Account: Docker Registry Setup For Cloud Providers

Additional Options

FDDKR_INP_ADDITIONAL_PARAMS

No

Add any additional options not listed above, which will be added to the run command. (e.g. --cidfile /test/file.cid -d -e MYVAR1)

Artifacts

This operation doesn’t consume or produce any artifacts.

Endpoint Selection

This operation delegates the selection to the workflow developer to determine.

Endpoint Execution

This operations delegates the execution to the workflow developer to decide.

Special Considerations

Due to the features included in this operation, it requires the docker executable to be on the path of the docker endpoint.

The following macros are not currently supported in the footer:
  • style