docker compose 指定运行用户user: root
adminnetcore:
container_name: "adminnetcore"
image: "reg.wuxiaoyang.top/aspire/adminnetcore:latest"
user: root
environment:
OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true"
OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true"
OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY: "in_memory"
ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true"
HTTP_PORTS: "8080"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889"
OTEL_SERVICE_NAME: "adminnetcore"
ports:
- target: 8080
published: 10000
- target: 8443
published: 10001
restart: unless-stopped
volumes:
- adminnetcore-data:/app/data