C
C#2w ago
Dachi

docker

Error response from daemon: Mounts denied: The path /ASP.NET/Https is not shared from the host and is not known to Docker. You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing. See https://docs.docker.com/desktop/mac for more info. docker-compose process finished with exit code 1
Docker Documentation
Sign in
Explore the Learning center and understand the benefits of signing in to Docker Desktop
11 Replies
Keswiik
Keswiik2w ago
show your compose file or whatever command you were running to get this error, dropping an error log with 0 context isn't very useful
Dachi
DachiOP2w ago
@KeswiikSorry for late response. This is compose.yml
services:
carvedrock.api:
image: carvedrock.api
build:
context: .
dockerfile: CarvedRock.Api/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_HTTP_PORTS=8080
- ASPNETCORE_HTTPS_PORTS=8081
- SeqAddress=http://seq:5341
- ConnectionStrings__CarvedRockPostgres=Host=pgdb;Port=5432;Database=carvedrock;Username=postgres;Password=carvedrock;
ports:
- "8080"
- "8081"
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/home/app/.microsoft/usersecrets:ro
- ${APPDATA}/ASP.NET/Https:/home/app/.aspnet/https:ro
seq:
image: datalust/seq:latest
ports:
- "5330:80"
environment:
- ACCEPT_EULA=Y

pgdb:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: C0nt*inersAreGreat
ports:
- '5444:5432'

services:
carvedrock.api:
image: carvedrock.api
build:
context: .
dockerfile: CarvedRock.Api/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_HTTP_PORTS=8080
- ASPNETCORE_HTTPS_PORTS=8081
- SeqAddress=http://seq:5341
- ConnectionStrings__CarvedRockPostgres=Host=pgdb;Port=5432;Database=carvedrock;Username=postgres;Password=carvedrock;
ports:
- "8080"
- "8081"
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/home/app/.microsoft/usersecrets:ro
- ${APPDATA}/ASP.NET/Https:/home/app/.aspnet/https:ro
seq:
image: datalust/seq:latest
ports:
- "5330:80"
environment:
- ACCEPT_EULA=Y

pgdb:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: C0nt*inersAreGreat
ports:
- '5444:5432'

I ve been stuck on this problem for a week i am trying to run api thru docker, but everytime there is new error I am using rider, mac.
Keswiik
Keswiik2w ago
well you need to expose those paths, or at least the root of the path, with docker even tells you where in the settings to do so
Dachi
DachiOP2w ago
i'll take a screenshot
Dachi
DachiOP2w ago
No description
Dachi
DachiOP2w ago
When i looked up problem everybody said to expose /Users but it still doesnt work
Keswiik
Keswiik2w ago
first off, what does APPDATA point to? because your error implies it isn't set as it is trying to mount /ASP.NET/Https
Dachi
DachiOP2w ago
I don't really know, i just followed video. this is my first docker setup
Keswiik
Keswiik2w ago
well you need to figure that out I would assume the tutorial you followed gave some details regarding it and if not that tutorial sucks
Dachi
DachiOP2w ago
okay i'll look it up Okay after a lot of digging i made it work. But i am not sure how well it is written. Maybe i could use some help with code ogranizaiton/best practices.
carvedrock.api:
image: carvedrock.api
build:
context: .
dockerfile: CarvedRock.Api/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_HTTP_PORTS=8080
- ASPNETCORE_HTTPS_PORTS=8081
- SeqAddress=http://seq:5341
- ConnectionStrings__CarvedRockPostgres=Host=pgdb;Port=5432;Database=carvedrock;Username=postgres;Password=C0nt*inersAreGreat;
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx
- ASPNETCORE_Kestrel__Certificates__Default__Password=654123
ports:
- "8080"
- "8081"
volumes:
- ~/.aspnet/https:/https:ro
carvedrock.api:
image: carvedrock.api
build:
context: .
dockerfile: CarvedRock.Api/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_HTTP_PORTS=8080
- ASPNETCORE_HTTPS_PORTS=8081
- SeqAddress=http://seq:5341
- ConnectionStrings__CarvedRockPostgres=Host=pgdb;Port=5432;Database=carvedrock;Username=postgres;Password=C0nt*inersAreGreat;
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx
- ASPNETCORE_Kestrel__Certificates__Default__Password=654123
ports:
- "8080"
- "8081"
volumes:
- ~/.aspnet/https:/https:ro
changes were added - ASPNETCORE_KestrelCertificatesDefaultPath=/https/aspnetapp.pfx - ASPNETCORE_KestrelCertificatesDefaultPassword=654123 and volumes: - ~/.aspnet/https:/https:ro @Keswiik
Keswiik
Keswiik2w ago
looks fine to me
Want results from more Discord servers?
Add your server