Web app for Multi-container: cannot map single file from host to container using Volumes of docker-compose and Azure Share

Enrico Piccini 0 Punti di reputazione
2024-04-16T14:42:06.03+00:00

Hi,

I'm using Azure Web app for Multi-container (Preview) to run a docker-compose file that run multiple containers.

Inside this docker-compose I have some references to external yaml configuration files (for example otel-collector, prometheus, etc).

I cannot find a way to map single file from host to container using Volumes of docker-compose.

I created an Azure Share connected to my Web App where I hosted the yaml configuration files.

Then in my docker-compose I wrote something like this:

volumes:

- otelshare/otel-collector-config.yaml:/etc/otel-collector-config.yaml

where otelshare is the name of my azure share.

WEBSITES_ENABLE_APP_SERVICE_STORAGE is setted to true.

I got this error:

Exception in multi-container config parsing: YamlException: (Line: 10, Col: 9, Idx: 262) - (Line: 10, Col: 77, Idx: 330): Bind mount must start with ${WEBAPP_STORAGE_HOME}.

Here is the full docker-compose just to give you more context:

version: '3.8'

services:

otel-collector-azure:

image: otel/opentelemetry-collector-contrib:latest

ports:

- "4317:4317"

- "4318:4318"

command: ['--config=/etc/otel-collector-config.yaml']

volumes:

- otelshare/otel-collector-config.yaml:/etc/otel-collector-config.yaml

volumes:

data:

driver: azure_file

driver_opts:

share_name: otelshare

storage_account_name: mystoragetest

Can anyone help me?

Azure
Azure
Una piattaforma e un'infrastruttura di cloud computing per la creazione, la distribuzione e la gestione di applicazioni e servizi tramite una rete mondiale di data center gestiti da Microsoft.
25 domande
0 commenti Nessun commento
{count} voti

1 risposta

Ordina per: Più utili
  1. Monica Caprio (Convergys International Europe) 640 Punti di reputazione Fornitore Microsoft
    2024-04-17T07:18:09.78+00:00

    Good day Enrico,

    This is the Italian forum. If you prefer to continue in English, please use the following link: https://learn.microsoft.com/en-us/answers/questions/ 

    In case you'd prefer to continue with the information in Italian language, please let me know.

    Best regards,

    Monica.