Azure_file for docker composer in Azure cloud

Viewed 2540

Trying to create ChirpStack Docker-Compose container in Azure cloud:

docker login azure
docker context create aci myacicontext
docker context use myacicontext
docker compose --file .\docker-compose.yml up

Got error:

cannot use ACI volume, required driver is “azure_file”, found “”

What I do wrong?

UPD Content of docker-compose.yml:

version: "3"

services:
  chirpstack-network-server:
    image: chirpstack/chirpstack-network-server:3
    volumes:
      - ./configuration/chirpstack-network-server:/etc/chirpstack-network-server

  chirpstack-application-server:
    image: chirpstack/chirpstack-application-server:3
    ports:
      - 8080:8080
    volumes:
      - ./configuration/chirpstack-application-server:/etc/chirpstack-application-server

  chirpstack-gateway-bridge:
    image: chirpstack/chirpstack-gateway-bridge:3
    ports:
      - 1700:1700/udp
    volumes:
      - ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge

  chirpstack-geolocation-server:
    image: chirpstack/chirpstack-geolocation-server:3
    volumes:
      - ./configuration/chirpstack-geolocation-server:/etc/chirpstack-geolocation-server

  postgresql:
    image: postgres:9.6-alpine
    environment:
      - POSTGRES_PASSWORD=root
    volumes:
      - ./configuration/postgresql/initdb:/docker-entrypoint-initdb.d
      - postgresqldata:/var/lib/postgresql/data

  redis:
    image: redis:5-alpine
    volumes:
      - redisdata:/data

  mosquitto:
    image: eclipse-mosquitto:2
    ports:
      - 1883:1883
    volumes: 
      - ./configuration/eclipse-mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf

volumes:
  postgresqldata:
  redisdata:
1 Answers

The error already shows you that it requires the driver azure_file for the volume when you use the Azure file share as the persistent volume. It should be like this:

volumes:
  postgresqldata:
    driver: azure_file
    driver_opts:
      share_name: myfileshare
      storage_account_name: mystorageaccount
  redisdata:
    driver: azure_file
    driver_opts:
      share_name: myfileshare
      storage_account_name: mystorageaccount

See more details about the File Share for the ACI through Docker Compose here.

Related