Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

356
Vistas
Why can't I use azure file share in my docker-compose to store mongodb data in Azure Container Instance?

When using a docker ACI context, the following docker-compose file fails. The mongodb container continuously restarts.

version: "3.9"

services:
  mongodb:
    image: mongo:5.0.6
    env_file: mongo.env
    environment:
      - MONGO_INITDB_ROOT_USERNAME=root
      - MONGO_INITDB_ROOT_PASSWORD=changeit
    ports:
      - 27017
    volumes:
      - dbdata:/data/db

volumes:
  dbdata:
    driver: azure_file
    driver_opts:
      share_name: mongodb-data
      storage_account_name: kpncoqyuxumoetuftz

If I don't use the azure_file storage it will run ok (But of course the data won't be persistent)

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I am not sure why I can't mount to the default directory /data/db but to get this to work I had to mount to a different directory and then replace the default command with one that takes a parameter.

Working version is below:

version: "3.9"

services:
  mongodb:
    image: mongo:5.0.6
    command: ["mongod", "--dbpath=/dbdata"]
    environment:
      - MONGO_INITDB_ROOT_USERNAME=root
      - MONGO_INITDB_ROOT_PASSWORD=changeit
    ports:
      - 27017
    volumes:
      - dbdata:/dbdata

volumes:
  dbdata:
    driver: azure_file
    driver_opts:
      share_name: mongodb-data
      storage_account_name: kpncoqyuxumoetuftz

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda