0
votes

I am facing a strange problem while running my simple application image (hosted on Azure container registry). When i create a Cloudtask in azure batch to run the image by getting it from azure container registry it seems like the base image of this image is not being pulled from the docker hub (It is my own another image which i pushed to docker hub). The things is when i run the image locally, everthing works as expected (there are different files/folders created in container) but on azure batch (nothing happens). What can be the problem. Thank you.

Results when image is running locally these files are created:

Before hello world

report.html

run.sh

wkhtmltopdf

After hello world

Results when the imaging is running on Azure batch

Before hello world

After hello world

Here is the Dockerfile

From "usmancombi/imaging"
COPY ./run_all.sh /run_all.sh
RUN dos2unix /run_all.sh
ENTRYPOINT [ "/run_all.sh" ]

Here is the run_all.sh file

#! /bin/bash

echo "Before hello world"
ls
echo "After hello world"
1

1 Answers

0
votes

To verify if the image is loaded, you can SSH (or RDP) into your compute node and query. However, if you specify the container on the pool, then the compute node will not provision properly if the specified container(s) are not found or loaded correctly.

Most likely, you are seeing the effects of Azure Batch setting the working directory of the container to $AZ_BATCH_TASK_WORKING_DIR.

Add pwd before ls in your script to verify.