Skip to main content Skip to complementary content

Publishing a Route or Data Service Job as a Microservice Docker image

Talend Studio allows you to publish your Routes and Data Service Jobs into a Docker registry.

Procedure

  1. Open the Route or Job that you want to build as a Microservice Docker image in the design workspace.
  2. In the Deployment view of the Job tab, from the Build Type list, select Microservice. Save the Route or Job.
    Select the Microservice build type.
  3. In the Repository tree view, select the Route or Job item you want to publish into a Docker registry.
  4. Right-click it and select Publish in the menu.
  5. In the Publish wizard, select Microservice as Docker Image in the build type list. Click Next.
    Publish a Route as a Microservice Docker image.
  6. Select the Only export the default context option to export only the default context used in the Route or Job.
    Set Docker image option.
  7. Select the Only export default context check box to export only the default context used in the Route or Job.
  8. Select the Enable Prometheus metrics endpoint check box to build the Prometheus metrics endpoint into the Microservice to monitor the execution of the Job or Route, JVM memory, CPU consumption, and so on. By default, this feature bridges all the JMX attributes and values into Prometheus. For more information about Prometheus, see the Prometheus documentation. Note that for Jobs, this option works from 8.0.1-R2024-03.
  9. Select Local or specify a remote address based on your Docker engine installation.
    Information noteWarning: If you select the Remote option, make sure that Docker daemon is started with a remote port.
  10. Specify your Docker image name, and image tag.
    By default, the image name is derived from the project name and Route or Job name, and the image tag is derived from the version of the Route or Job. You can specify a new name and tag here or customize the default settings globally in Project Settings. For more information, see Customizing Docker images build settings.
    Information noteWarning: Underscore characters are not supported in Docker image names, therefore make sure the Docker image name value does not contain underscore characters.
    Information noteWarning: The current behavior of Docker image building in Talend Studio is:
    1. Build the target image with the latest tag even if a custom tag (for example 0.1.2) is set.
    2. Remove the latest tag and its alias (for example 0.1.1), then delete the image before building a new image.
    3. Tag the new build image with latest and an alias (for example 0.1.2).

    As a result, the old image is always overwritten and there is only one image with the tag latest and its alias (for example 0.1.2) of the Job in the Docker engine.

    To keep the old images, you can set the image name with the tag in the Image name field of the Publish wizard, for example, p1/job1:0.1.0. (Or set -Dtalend.docker.name=p1/job1:0.1.0 in CI). Then Talend Studio will build the image with the assigned tag only and will not delete the existing images.

  11. Specify your username and password.
  12. Click Finish to start publishing your Docker image to the specified Docker registry.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!