Docker plugin

5 minute readExtensibilityDeveloper productivity

Docker is an open platform for developing, shipping, and running applications. Docker is designed to deliver your applications faster, allowing you to separate your applications from your infrastructure and treat your infrastructure like a managed application. Docker helps you to:

  • Ship code faster.

  • Test faster.

  • Deploy faster.

  • Shorten the cycle between writing code and deploying it.

With Docker, you can package an application with all of its dependencies in a standardized unit for software development. Containers wrap your application in a complete file system that has everything it needs to run (for example, code, runtime, system tools, libraries, and other components installed on a server). The result is an application that behaves the same, regardless of the environment on which it is running. For more information about Docker, refer to http://www.docker.com.

This plugin also supports Docker engines in Swarm mode. The cluster management and orchestration features embedded in the Docker engine are built using SwarmKit. Docker Swarm is a cluster of Docker engines, or nodes, where you deploy services. When you create a service, you specify the container image to use and the commands to execute inside running containers. For more information about Docker Swarm, refer to Swarm mode key concepts.

Integrating CloudBees CD/RO with Docker

This plugin deploys CloudBees CD/RO service as a single container or as a Docker Swarm service if the Docker endpoint is a standalone Docker engine or Docker Swarm cluster manager. It checks the type of Docker endpoint at runtime and deploys a container or Docker Swarm service accordingly.

The Transport Layer Security (TLS) mutual authentication and encryption is supported between the Docker endpoint and the CloudBees CD/RO agent.

Plugin version 2.0.0

Revised on August 04, 2022

Plugin configurations

Plugin configurations are sets of parameters that apply across some or all of the plugin procedures. They reduce repetition of common values, create predefined parameter sets for end users, and securely store credentials where needed. Each configuration is given a unique name that is entered in designated parameters on procedures that use them.

Creating plugin configurations

To create plugin configurations in CloudBees CD/RO, do these steps:

  • Go to Administration  Plugins to open the Plugin Manager.

  • Find the EC-Docker-2.0.0 row.

  • Select Configure to open the Configurations page.

  • Select Create Configuration as per the description of parameters below.

Configuration procedure parameters

Parameter Description

Configuration

Unique name for the plugin configuration.

Description

Description for the plugin configuration.

Docker Registry

Custom Docker Registry. For example, myregistry.local or localhost:5000). Leave empty for the default Registry, which is Docker Hub.

Username and password

Username and password for Docker Registry (Docker Hub or private Docker Registry).

Debug Level

This option sets debug level for logs. If info is selected, only summary information will be shown, for debug, there will be some debug information and for trace the whole requests and responses will be shown.

Plugin procedures

runDockerBuild

Performs a docker build

runDockerBuild parameters

Parameter Description

Configuration Name

Previously defined configuration for the plugin.

Use sudo

Use sudo for running Docker build

Build path

Path to source code

runDockerPull

Performs a Docker pull on the requested image

runDockerPull parameters

Parameter Description

Configuration Name

Previously defined configuration for the plugin.

Use sudo

Use sudo for running Docker pull

Image name

Image to pull from Docker Hub

Image tag

Tag of image

runDockerRun

Performs a Docker run

runDockerRun parameters

Parameter Description

Configuration Name

Previously defined configuration for the plugin.

Use sudo

Use sudo for running Docker run

Image name

Image to run a container from

Container name

Assign a name to the container

Detached mode (-d)

Run the container in the background and print the new container ID

Entrypoint

Overwrite the default ENTRYPOINT of the image

Container working directory

Working directory inside the container

Publish ports

Publish a container’s port to the host (format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort).

Use spaces to delimit port mappings, for example "2666:1666 8088:8080"

Publish all ports

Publish all exposed ports to the host interfaces

Privileged

Give extended privileges to this container

Link

Add link to another container in the form of name:alias

Command with args

Command to run within container

Known issues

Backslashes (\) are not supported in .Dockerignore for Artifact2Image procedure. Use forward slashes.

Release notes

EC-Docker 2.0.0

  • Revised the EC-Docker plugin to remove the old microservices model and adopt pure Docker procedures with authorization handling.

EC-Docker 1.6.5

  • Upgraded third-party dependencies to address security issues.

EC-Docker 1.6.4

  • Support for "Artifactory Classifier" and "Artifactory Extract" fields was added to the Artifact2Image procedure

EC-Docker 1.6.3

  • The documentation has been migrated to the main site.

EC-Docker 1.6.2

  • Upgrading dependencies to address security issues.

EC-Docker 1.6.1

  • Renaming to "CloudBees CD/RO"

EC-Docker 1.6.0

  • Provisioning of Binary Dependencies (for example Grape jars) in the agent resource, required by this plugin, is now delivered through a newly introduced mechanism called Plugin Dependency Management. Binary dependencies will now be seamlessly delivered to the agent resource from the Flow Server, any time a new version of a plugin is invoked the first time. Flow Repository set up is no longer required for this plugin.

  • Add checking connection while creating/editing a configuration.

EC-Docker 1.5.3

  • Renaming to "CloudBees".

EC-Docker 1.5.2

  • Images in the help file have been fixed.

EC-Docker 1.5.1

  • Configurations can be created by users with "@" sign in a name.

EC-Docker 1.5.0

  • Plugin promotion time has been improved.

EC-Docker 1.4.0

  • Previously deprecated Discover procedure has been removed. Use the Import Microservices procedure to create microservice models based on the given Docker Compose file contents.

  • Fixed the report link for unsupported tags that were not processed by the Import Microservices.

  • Configured the plugin to allow the ElectricFlow UI to create configs inline of procedure form.

EC-Docker 1.3.0

  • Added Import Microservices procedure which can be used through the Import Docker Compose file catalog item in the Containers service catalog for creating microservice models in ElectricFlow.

  • Added Artifact2Image procedure.

  • Discover procedure is Deprecated. Use the Import Microservices procedure to create microservice models based on the given Docker Compose file contents

  • Added support for retrieving and creating the plugin configurations through the Configurations option on the application process step and the pipeline stage task editors.

EC-Docker 1.2.2

  • Registered the Undeploy Service procedure as an Undeploy Service operation to enable undeploying microservices modeled in ElectricFlow from Docker using the service process.

  • Added Create Ingress and Delete Network procedures.

  • Added support for container update on standalone Docker engine.

  • Added support for attaching additional networks during container update.

EC-Docker 1.2.1

  • Added support for Docker network creation.

    • For Stand-alone Docker instances, Deploy Service procedure creates a user defined bridge network if network name given in service mapping page. Procedure uses this network to deploy containers.

    • For Docker Swarm instances, Deploy Service procedure creates a user defined overlay network if network name given in service mapping page. Procedure uses this network to deploy Docker Swarm services.

EC-Docker 1.2.0

  • Added support for deploying microservices modeled in ElectricFlow to Docker. Deploying microservices to the following Docker environments are supported:

    • Stand-alone Docker instances

    • Docker Swarm

    • Docker Enterprise Edition

    • Windows Docker containers on Windows 2016

    • Docker Swarm

    • Docker Enterprise Edition

    • Windows Docker containers on Windows 2016

  • Added procedure Undeploy Service to undeploy a previously deployed service.

  • Added procedure Remove Docker Service to remove a service running on a stand-alone Docker host or a Docker Swarm cluster.

  • Removed support for using EC-Docker as a component plugin. Microservices-based applications should be modeled as applications with services. The services can then be deployed using the native ElectricFlow services deployment capability.

EC-Docker 1.0.1

  • Discover procedure has been added.

EC-Docker 1.0.0

  • Introduced the EC-Docker plugin.