You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This article explains container jobs in Azure Pipelines. Containers are lightweight abstractions that provide isolation from host operating systems.
15
+
This article explains container jobs in Azure Pipelines. Containers are lightweight abstractions from the host operating system that provide all the necessary elements to run a job in a specific environment.
16
16
17
-
By default, Azure Pipelines [jobs](phases.md) run directly on host machines with [agents](../agents/agents.md) installed. Hosted agent jobs are convenient, require little initial setup or infrastructure maintenance, and are well-suited for basic projects. If you want more control over task context, you can define and run pipeline jobs in containers with the exact versions of operating systems, tools, and dependencies you want.
17
+
By default, Azure Pipelines [jobs](phases.md) run directly on [agents](../agents/agents.md) installed on host machines. Hosted agent jobs are convenient, require little initial setup or infrastructure maintenance, and are well-suited for basic projects. If you want more control over task context, you can define and run pipeline jobs in containers that have the exact versions of operating systems, tools, and dependencies you want.
18
18
19
-
For a container job, the agent first fetches and starts the container, and then each step of the job runs inside the container. If you need fine-grained control of individual build steps, you can use [step targets](tasks.md#step-target) to choose a container or host for each step.
19
+
For a container job, the agent first fetches and starts the container, and then runs each step of the job inside the container. If you need fine-grained control of individual build steps, you can use [step targets](tasks.md#step-target) to choose a container or host for each step.
20
20
21
21
## Requirements for container jobs
22
22
23
23
- A YAML-based pipeline. Classic pipelines don't support container jobs.
24
-
- A Windows or Ubuntu hosted agent. MacOS agents don't support containers. For non-Ubuntu Linux agents, see [Nonglibc-based containers](#nonglibc-based-containers).
24
+
- A Windows or Ubuntu hosted agent. MacOS agents don't support containers. To use non-Ubuntu Linux agents, see [Nonglibc-based containers](#nonglibc-based-containers).
25
25
- Docker installed on the agent, with permission to access the Docker daemon.
26
26
27
27
>[!NOTE]
@@ -116,7 +116,7 @@ steps:
116
116
117
117
A container job uses the underlying host agent's Docker configuration file for image registry authorization. This file signs out at the end of the Docker registry container initialization.
118
118
119
-
Registry image pulls for container jobs could be denied for `unauthorized authentication` if another job running in parallel on the agent already signed out the Docker configuration file. The solution is to set a Docker environment variable called `DOCKER_CONFIG` for each agent pool that runs on the hosted agent.
119
+
Registry image pulls for container jobs could be denied for `unauthorized authentication` if another job running in parallel on the agent already signed out the Docker configuration file. The solution is to set a Docker environment variable called `DOCKER_CONFIG` for each agent pool running on the hosted agent.
120
120
121
121
Export the `DOCKER_CONFIG` in each agent pool's *runsvc.sh* script as follows:
122
122
@@ -180,7 +180,7 @@ jobs:
180
180
181
181
## Service endpoints
182
182
183
-
You can host containers on registries other than public Docker Hub. To host an image on [Azure Container Registry](/azure/container-registry/) or another private container registry, including a private Docker Hub registry, add a [service connection](../library/service-endpoints.md) to access the registry. Then you can reference the endpoint in the container definition.
183
+
You can host containers on registries other than public Docker Hub. To host an image on [Azure Container Registry](/azure/container-registry/) or another private container registry, including a private Docker Hub registry, add a [service connection](../library/service-endpoints.md#docker-registry-service-connection) to access the registry. Then you can reference the endpoint in the container definition.
0 commit comments