Hi, I'm going outside the box a little here, and trying to override the otel collector the Aspire Dashboard/AppHost uses so that I can also share the collector with other processes.
When I get to the DistributedAppBuilder.AddResource()......WithVolume() part, I was expecting to be able to enter in docker volume info just like they would appear in a docker-compose.yaml file. At least in Visual Studio, if you have a docker-compose, relative paths in it will be relative to your Solution folder.
So here's what I'd like to pass into WithVolume():
.WithVolume("./Otel/Config", "/config")
However, I can't get past the following error. I've tried both absolute and relative paths, and I've tried them both with both backslashes and forward slashes.
Aspire.Hosting.Dcp.dcpctrl.ContainerReconciler[0]
could not create the container {"Container": {"name":"opentelemetrycollector"}, "Reconciliation": 2, "error": "CreateContainer command returned error code 1 Stdout: '' Stderr: 'Error response from daemon: create S:\\Source\\.....\\AppHost\\bin\\Debug\\net8.0\\Otel\\Config: \"S:\\\\Source\\\\......\\\\AppHost\\\\bin\\\\Debug\\\\net8.0\\\\Otel\\\\Config\" includes invalid characters for a local volume name, only \"[a-zA-Z0-9][a-zA-Z0-9_.-]\" are allowed. If you intended to pass a host directory, use absolute path\n'"}
Hi, I'm going outside the box a little here, and trying to override the otel collector the Aspire Dashboard/AppHost uses so that I can also share the collector with other processes.
When I get to the
DistributedAppBuilder.AddResource()......WithVolume()
part, I was expecting to be able to enter in docker volume info just like they would appear in adocker-compose.yaml
file. At least in Visual Studio, if you have a docker-compose, relative paths in it will be relative to your Solution folder.So here's what I'd like to pass into
WithVolume()
:.WithVolume("./Otel/Config", "/config")
However, I can't get past the following error. I've tried both absolute and relative paths, and I've tried them both with both backslashes and forward slashes.