How can I add an Azure File Share to my container deployment to persist data using github workflows and aci-deploy@v1.1.3

Saša 1 Reputation point
2025-02-17T11:13:02.2566667+00:00

Hey there,

I am having trouble using azure file share as mounted volume aci-deploy@v1.1.3.

I use a Service Principal with Contributor privileges and a LRS/ StorageV2 Storage Account.

I am

  1. pulling the alpine image from docker
  2. tag the image
  3. push it to my ACR
  4. deploy the container using aci-deploy@v1.1.3 https://learn.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files

The container is deployed but restarts frequently. The container loges are "No logs available"

and no entries are made in log analytics.

The deployment without the file mount (4 lines starting with azure-file-volume omitted) work fine.

How can I further debug this? Am I doing something wrong here?

name: alpine


## This workflow is triggered on push to development branch and manually by workflow_dispatch.
on:
  workflow_dispatch:
  push:
    branches:
      - feature/testing_alpine_with_file_hare

## Jobs to build and deploy the application to Azure Container Instances.

jobs:
  build-and-deploy:
    runs-on: ubuntu-22.04
    environment: 'development'
    steps:
      - name: 'Checkout GitHub Action'
        uses: actions/checkout@main

      - name: Log in with Azure
        uses: azure/login@v2.1.1
        with:
            creds: ${{ secrets.AZ_TECHNICAL_USER_CREDS }}

      - name: 'Log in to Azure Container Registry'
        uses: azure/docker-login@v2
        with:
          login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
          username: ${{ secrets.AZ_TECHNICAL_USER_ID }}
          password: ${{ secrets.AZ_TECHNICAL_USER_SECRET }}
      
      - name: Pull and push Weaviate Docker image if not exists
        run: |
          docker pull alpine:latest
          docker tag alpine:latest ${{ secrets.REGISTRY_LOGIN_SERVER }}/alpine:latest
          docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alpine:latest


      - name: 'Deploy Simple Container to Azure Container Instances'
        uses: 'azure/aci-deploy@v1.1.3'
        with:
          resource-group: ${{ secrets.RESOURCE_GROUP }}
          dns-name-label: test-alpine
          image: ${{ secrets.REGISTRY_LOGIN_SERVER }}/alpine:latest
          registry-login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
          registry-username: ${{ secrets.AZ_TECHNICAL_USER_ID }}
          registry-password: ${{ secrets.AZ_TECHNICAL_USER_SECRET }}
          name: test-alpine
          azure-file-volume-account-name: ${{ secrets.AZURE_STORAGE_ACCOUNT_NAME }}
          azure-file-volume-account-key: ${{ secrets.AZURE_STORAGE_ACCOUNT_KEY }}
          azure-file-volume-share-name: alpine-data
          azure-file-volume-mount-path: /mnt/data
          log-analytics-workspace: ${{ secrets.LOG_ANALYTICS_WORKSPACE_ID }}
          log-analytics-workspace-key: ${{ secrets.LOG_ANALYTICS_WORKSPACE_KEY }}
          log-type: 'ContainerInstanceLogs'
          ports: '8080 50051'
          location: ${{ secrets.LOCATION }}
          memory: 3
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,414 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.