Run a Docker Container
This plugin creates a Docker container, which is a runtime instance of a Docker image.
To configure the Run a Docker Container step:
-
Add the Run a Docker Container step to a chain, as described in Create chains.
-
Enter the plugin configuration details:
Field Description Title Enter a name for the plugin step or accept the default name. Docker image name Enter a name for the Docker image to be created. Pull image from registry (Optional) To pull the Docker image from registry, enter the registry details:
-
URL. Enter the URL that matches the directory in the Docker engine from which you want to access a remote Docker Registry, for example:
https://registry.company.com/
-
Username. Enter the username of the user with access the Docker Registry.
-
Password. Enter the Docker Registry user's password.
-
Email. Enter the Docker Registry user's email.
Start container (Optional) Start container. Attach container (Optional) Attach container. Container name (Optional) Enter the name of the Docker container to be created. Port mappings (Optional) Bind the port number from the Docker host engine into the container. Use this format: host_port:container_port.
For example: 80:8080
Container environment variables (Optional) Enter environment variables to pass to container, for example:
PULSE_USER=username
Command to run in container (exec) (Optional) Enter the command to run in the Docker container, for example:
mvn clean install
Container working directory (Optional) Enter the path to the working directory inside the container, for example, /tmp/workspace. Volumes to mount into container (Optional) Mount additional host directories as data volumes inside the container. Use this format: host_dir:container_dir.
For example: /app/src:/app
Volumes to mount from other containers (Optional) Mount volumes from another container. Advanced options (Optional) Docker host Enter the Docker host to use. Default: tcp://0.0.0.0:2376 Local file path on Agent to certificates Enter the local file path on Agent to certificates. Configuration directory on Agent Specify the configuration directory on Agent. -
See also: