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
Copy file name to clipboardExpand all lines: articles/batch/batch-docker-container-workloads.md
+59-43Lines changed: 59 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Container workloads on Azure Batch
3
3
description: Learn how to run and scale apps from container images on Azure Batch. Create a pool of compute nodes that support running container tasks.
@@ -47,7 +47,7 @@ Keep in mind the following limitations:
47
47
- For Windows container workloads, you should choose a multicore VM size for your pool.
48
48
49
49
> [!IMPORTANT]
50
-
> Note that docker, by default, will create a network bridge with a subnet specification of `172.17.0.0/16`. If you are specifying a
50
+
> Docker, by default, will create a network bridge with a subnet specification of `172.17.0.0/16`. If you are specifying a
51
51
> [virtual network](batch-virtual-network.md) for your pool, please ensure that there are no conflicting IP ranges.
52
52
53
53
## Supported VM images
@@ -56,12 +56,16 @@ Use one of the following supported Windows or Linux images to create a pool of V
56
56
57
57
### Windows support
58
58
59
-
Batch supports Windows server images that have container support designations. Typically, these image SKU names are suffixed with `win_2016_mcr_20_10` or `win_2022_mcr_20_10` under the Mirantis publisher and are offered as `windows_2016_with_mirantis_container_runtime` or `windows_2022_with_mirantis_container_runtime`. Additionally, [the API to list all supported images in Batch](batch-linux-nodes.md#list-of-virtual-machine-images) denotes a `DockerCompatible` capability if the image supports Docker containers.
59
+
Batch supports Windows server images that have container support designations.
60
+
[The API to list all supported images in Batch](batch-linux-nodes.md#list-of-virtual-machine-images) denotes
61
+
a `DockerCompatible` capability if the image supports Docker containers. Batch allows, but doesn't directly
62
+
support, images published by Mirantis with capability noted as `DockerCompatible`. These images may only be
63
+
deployed under a User Subscription pool allocation mode Batch account.
60
64
61
65
You can also create custom images from VMs running Docker on Windows.
62
66
63
67
> [!NOTE]
64
-
> The image SKUs `-with-containers` or `-with-containers-smalldisk` are retired. Please see the [announcement](https://techcommunity.microsoft.com/t5/containers/updates-to-the-windows-container-runtime-support/ba-p/2788799) for details and alternative container runtime options for Kubernetes environment.
68
+
> The image SKUs `-with-containers` or `-with-containers-smalldisk` are retired. Please see the [announcement](https://techcommunity.microsoft.com/t5/containers/updates-to-the-windows-container-runtime-support/ba-p/2788799) for details and alternative container runtime options.
65
69
66
70
### Linux support
67
71
@@ -73,6 +77,9 @@ For Linux container workloads, Batch currently supports the following Linux imag
73
77
- Offer: `centos-container`
74
78
- Offer: `ubuntu-server-container`
75
79
80
+
- Publisher: `microsoft-dsvm`
81
+
- Offer: `ubuntu-hpc`
82
+
76
83
#### VM sizes with RDMA
77
84
78
85
- Publisher: `microsoft-azure-batch`
@@ -82,10 +89,13 @@ For Linux container workloads, Batch currently supports the following Linux imag
82
89
- Publisher: `microsoft-dsvm`
83
90
- Offer: `ubuntu-hpc`
84
91
92
+
> [!IMPORTANT]
93
+
> It is recommended to use the `microsoft-dsvm``ubuntu-hpc` VM image if possible.
94
+
85
95
#### Notes
86
96
The docker data root of the above images lies in different places:
87
-
- For the batch image `microsoft-azure-batch` (Offer: `centos-container-rdma`, etc.), the docker data root is mapped to _/mnt/batch/docker_, which is usually located on the temporary disk.
88
-
- For the HPC image, or `microsoft-dsvm` (Offer: `ubuntu-hpc`, etc.), the docker data root is unchanged from the Docker default which is _/var/lib/docker_ on Linux and _C:\ProgramData\Docker_ on Windows. These folders are usually located on the OS disk.
97
+
- For the Azure Batch published `microsoft-azure-batch`images (Offer: `centos-container-rdma`, etc.), the docker data root is mapped to _/mnt/batch/docker_, which is located on the temporary disk.
98
+
- For the HPC image, or `microsoft-dsvm` (Offer: `ubuntu-hpc`, etc.), the docker data root is unchanged from the Docker default which is _/var/lib/docker_ on Linux and _C:\ProgramData\Docker_ on Windows. These folders are located on the OS disk.
89
99
90
100
For non-Batch published images, the OS disk has the potential risk of being filled up quickly as container images are downloaded.
91
101
@@ -136,9 +146,9 @@ To configure a container-enabled pool without prefetched container images, defin
When you access containers stored in [Azure Container Registry](https://azure.microsoft.com/services/container-registry), either a username/password or a managed identity can be used to authenticate with the service. To use a managed identity, first ensure that the identity has been [assigned to the pool](managed-identity-pools.md) and that the identity has the `AcrPull` role assigned for the container registry you wish to access. Then, simply tell Batch which identity to use when authenticating with ACR.
328
+
When you access containers stored in [Azure Container Registry](https://azure.microsoft.com/services/container-registry),
329
+
either a username/password or a managed identity can be used to authenticate with the service. To use a managed identity,
330
+
first ensure that the identity has been [assigned to the pool](managed-identity-pools.md) and that the identity has the
331
+
`AcrPull` role assigned for the container registry you wish to access. Then, instruct Batch with which identity to use
@@ -348,12 +362,10 @@ CloudPool pool = batchClient.PoolOperations.CreatePool(
348
362
349
363
To run a container task on a container-enabled pool, specify container-specific settings. Settings include the image to use, registry, and container run options.
350
364
351
-
- Use the `ContainerSettings` property of the task classes to configure container-specific settings. These settings are defined by the [TaskContainerSettings](/dotnet/api/microsoft.azure.batch.taskcontainersettings) class. Note that the`--rm` container option doesn't require an additional `--runtime` option since it's taken care of by Batch.
365
+
- Use the `ContainerSettings` property of the task classes to configure container-specific settings. These settings are defined by the [TaskContainerSettings](/dotnet/api/microsoft.azure.batch.taskcontainersettings) class. The`--rm` container option doesn't require an additional `--runtime` option since it's taken care of by Batch.
352
366
353
367
- If you run tasks on container images, the [cloud task](/dotnet/api/microsoft.azure.batch.cloudtask) and [job manager task](/dotnet/api/microsoft.azure.batch.cloudjob.jobmanagertask) require container settings. However, the [start task](/dotnet/api/microsoft.azure.batch.starttask), [job preparation task](/dotnet/api/microsoft.azure.batch.cloudjob.jobpreparationtask), and [job release task](/dotnet/api/microsoft.azure.batch.cloudjob.jobreleasetask) don't require container settings (that is, they can run within a container context or directly on the node).
354
368
355
-
- For Windows, tasks must be run with [ElevationLevel](/rest/api/batchservice/task/add#elevationlevel) set to `admin`.
356
-
357
369
- For Linux, Batch maps the user/group permission to the container. If access to any folder within the container requires Administrator permission, you may need to run the task as pool scope with admin elevation level. This ensures that Batch runs the task as root in the container context. Otherwise, a non-admin user might not have access to those folders.
358
370
359
371
- For container pools with GPU-enabled hardware, Batch automatically enables GPU for container tasks, so you shouldn't include the `–gpus` argument.
A Batch container task executes in a working directory in the container that's very similar to the directory that Batch sets up for a regular (non-container) task. Note that this working directory is different from the [WORKDIR](https://docs.docker.com/engine/reference/builder/#workdir) if configured in the image, or the default container working directory (`C:\` on a Windows container, or `/` on a Linux container).
391
+
A Batch container task executes in a working directory in the container that's similar to the directory that Batch sets up for a regular (non-container) task. This working directory is different from the [WORKDIR](https://docs.docker.com/engine/reference/builder/#workdir) if configured in the image, or the default container working directory (`C:\` on a Windows container, or `/` on a Linux container).
380
392
381
393
For a Batch container task:
382
394
383
395
- All directories recursively below the `AZ_BATCH_NODE_ROOT_DIR` on the host node (the root of Azure Batch directories) are mapped into the container.
384
396
- All task environment variables are mapped into the container.
385
397
- The task working directory `AZ_BATCH_TASK_WORKING_DIR` on the node is set the same as for a regular task and mapped into the container.
386
398
399
+
> [!IMPORTANT]
400
+
> For Windows container pools on VM families with ephemeral disks, the entire ephemeral disk is mapped to container space
401
+
> due to Windows container limitations.
402
+
387
403
These mappings allow you to work with container tasks in much the same way as non-container tasks. For example, install applications using application packages, access resource files from Azure Storage, use task environment settings, and persist task output files after the container stops.
Copy file name to clipboardExpand all lines: articles/container-registry/container-registry-java-quickstart.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ Finally, you'll update your project configuration and use the command prompt to
115
115
</properties>
116
116
```
117
117
118
-
1. Update the `<plugins>` collection in the *pom.xml* file so that the `<plugin>` element contains and an entry for the `jib-maven-plugin`, as shown in the following example. Note that we are using a base image from the Microsoft Container Registry (MCR): `mcr.microsoft.com/java/jdk:8-zulu-alpine`, which contains an officially supported JDK for Azure. For other MCR base images with officially supported JDKs, see [Install the Microsoft Build of OpenJDK.](/java/openjdk/install)
118
+
1. Update the `<plugins>` collection in the *pom.xml* file so that the `<plugin>` element contains and an entry for the `jib-maven-plugin`, as shown in the following example. Note that we are using a base image from the Microsoft Container Registry (MCR): `mcr.microsoft.com/openjdk/jdk:11-ubuntu`, which contains an officially supported JDK for Azure. For other MCR base images with officially supported JDKs, see [Install the Microsoft Build of OpenJDK.](/java/openjdk/install)
119
119
120
120
```xml
121
121
<plugin>
@@ -124,7 +124,7 @@ Finally, you'll update your project configuration and use the command prompt to
0 commit comments