--- title: "Run a Docker image as a pipeline" description: "Run your own container image as a TIR pipeline step with an Argo Workflow file, including a private image from the TIR Container Registry." content_type: "how-to" product: "pipelines" platform: "TIR" url: "/tir/pipelines/how-to/run-a-docker-image/" topic: ["containers"] relationships: {"requires":["/tir/pipelines/how-to/create-a-pipeline/"]} --- # Run a Docker image as a pipeline Run your own container image as a pipeline step. Write an Argo Workflow file that names the image, the command, and its arguments, then upload it as a pipeline. You can change the entry point to suit the job, and run it once or on a schedule. If you are new to pipelines, start with [Get started with Pipelines](/tir/pipelines/get-started/). ## Write the pipeline file Save this file on your computer as a `.yaml` file and change the values for your job. ```yaml apiVersion: argoproj.io/v1alpha1 kind: Workflow metadata: name: your-workflow-name labels: workflows.argoproj.io/archive-strategy: "false" annotations: workflows.argoproj.io/description: | An example to run jobs with an entrypoint script inside the Docker Container. spec: entrypoint: your-entrypoint-name imagePullSecrets: - name: your-image-pull-secret templates: - name: your-entrypoint-name container: image: your-docker-image-url command: ["sh"] args: ["entrypoint.sh"] ``` Change these values: - `image`: the URL of your Docker image. - `command` and `args`: what to run in the container. The example runs `entrypoint.sh` with `sh`. - `imagePullSecrets`: the pull secret for a private image. Remove this block for a public image. - `entrypoint`: the name of the template to start with. TIR names the workflow itself, in place of the `name` in the file. For the file format, see the [Argo Workflows documentation](https://argo-workflows.readthedocs.io/en/latest/walk-through/). ## Find your image pull secret The pull secret belongs to a registry in the [TIR Container Registry](/tir/tir-container-registry/). Only a private image needs one. 1. In the side menu, under **Storage**, select **Container Registry**. 2. Find the registry that holds your image. In its row, select the button in the **Commands** column. 3. In the **Docker Commands** panel, find the line that begins ImagePullSecret Name. The name below it is the pull secret, in the form `namespace-secret-`. Put it under `imagePullSecrets` in your file. ## Create the pipeline and the run 1. [Create a pipeline](/tir/pipelines/how-to/create-a-pipeline/) from the file. 2. [Create a run](/tir/pipelines/how-to/create-a-run/) of it. You can make several runs of one version. 3. Open the run and its step's **Logs** to follow it; see [Watch a run and read its logs](/tir/pipelines/how-to/watch-a-run-and-read-its-logs/). To change the image or the command later, [create a pipeline version](/tir/pipelines/how-to/create-a-pipeline-version/) and run that version.