# How do I run a container job in Cloud?

Company: Socra — Multiply Your Judgment
Canonical URL: https://support.socra.com/articles/art_01m46fsrcx0dhhqjdrsky2tp4g-deploy-a-container-job

Create a Run Workload with kind `job`, then deploy an OCI image pinned to a digest. A Workload holds the job's desired configuration. Each Deployment attempts to run that image and configuration; a successful Deployment creates an immutable Revision.

A job runs a finite task and has no service URL. Choose a service Workload when the application must serve requests continuously.

## Prepare the Project and image

You need the Socra CLI with its Account, Service, and Run plugins. Sign in to the Account that owns the Project. Enable Run on the target Project and make sure your identity can create Workloads and Deployments there.

Prepare an OCI image for the job. Use its full digest reference, such as `REGISTRY/REPOSITORY@sha256:DIGEST`, rather than a mutable tag. Run must be able to pull that image. If the image is stored in Socra Container Registry, the corresponding registry access must also be available.

Check the applicable service pricing before creating resources. Building local source is a separate path through Build and can incur Build usage charges; the steps here use an image that already exists.

## Create and deploy the job

Replace `WORKLOAD_NAME` with the name you want for this job and `PROJECT_ID` with the target Project's `proj_…` ID:

```sh
socra run workload create WORKLOAD_NAME --project PROJECT_ID --kind job
```

Save the returned Workload ID. Replace `IMAGE_DIGEST` below with the complete image reference ending in `@sha256:…`:

```sh
socra run deploy WORKLOAD_NAME --project PROJECT_ID --image IMAGE_DIGEST
```

When the deployment succeeds, the CLI prints the image, Deployment ID, Revision ID, and status. If it fails, the error includes the Deployment ID and diagnostics. Keep that ID so you can inspect the attempt.

## Check the result

Replace `DEPLOYMENT_ID` with the returned `dpl_…` ID:

```sh
socra run status DEPLOYMENT_ID
socra run logs DEPLOYMENT_ID
socra run events DEPLOYMENT_ID
```

Check both the reported status and your job's expected output. A missing URL is normal for a job. If the deployment fails, use its logs and lifecycle events before starting another attempt.

Run retains deployment history. Workload deletion is limited to unused Workloads, so plan for the history created by this first execution. The [Run reference](https://cloud.socra.com/docs/run) covers runtime configuration, service Workloads, and the API.

## Article details

- Collection: [Cloud](https://support.socra.com/collections/col_01kzpmz634mj0yhn7efqjkem66-cloud)
- Canonical: https://support.socra.com/articles/art_01m46fsrcx0dhhqjdrsky2tp4g-deploy-a-container-job
