Azure Container - interact with files on remote container instance

Viewed 312

I'm trying to remotely interact with a container instance in Azure. I've performed following steps:

  1. Loaded local image on local registry

    docker load -i ima.tar

  2. Loggin in to remote ACR

    docker login --username --password + login-server

  3. Tagged the image

    docker tag local-image:tag <login-server/repository-name:tag>

  4. Pushed imaged

    docker push <login-server/repository-name:tag>

If I try to run a command like this:

az container exec --resource-group myResourceGroup --name <name of cotainer group> --container-name <name of container app> --exec-command "/bin/bash"

I can successfully login to bash interactively. My Goal is to process local file to the a remote ACI using the ACR image, something like this:

docker run -t -i --entrypoint=./executables/run.sh -v "%cd%"\..:/opt/test remote_image:tag

Is it there a way to do so? How can I run ACI e remote push file via AZ CLI? Thx

1 Answers

For your purpose, I recommend you mount the Azure File Share to the ACI and then upload the files to the File Share. Finally, you can access the files in the File Share inside the ACI. Follow the steps here to mount the File Share.

Related