Best practices when adding files to docker image used in azure batch?

Tiffany Seale 20 Reputation points

I'm trying to allow for the use of docker images in our azure ecosystem, possibly with the ability to ADD and COPY files inside of the docker image to be used inside of the Azure Batch Task. When I try to ADD files I can't access (or see) them inside of the task or pool, even though when I run the image locally I can see them. Should I just be using the batch resources to pull in the files instead? I'm not sure what the best practice is here, there is no documentation about it.

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
293 questions
0 comments No comments
{count} votes

Accepted answer
  1. Azar 13,705 Reputation points

    Hey Tiffany Seale

    Thats an great question and thanks for posting the question and QandA platform,

    It's crucial to make sure that your approach aligns with best practices.lemme drop you a few pointers

    so when working with Docker images in Azure Batch, consider storing necessary files in Azure Batch File Shares or Azure Storage instead of adding them directly to the Docker image. You can then mount these shares during task execution, ensuring efficient file management. Avoid relying on files added during the Docker image build, and use tools like azcopy or wget within your Batch tasks to download files as needed.

    For large files, Azure Storage is a good option. You can download the required files from Azure Storage within your Batch tasks.

    If your files are in Azure Blob Storage, you can use tools like BlobFuse to mount blobs as directories inside your Docker container.

    If this helps kindly accept the answer thanks much.

    0 comments No comments

0 additional answers

Sort by: Most helpful