-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
33 lines (25 loc) · 981 Bytes
/
docker-compose.yml
File metadata and controls
33 lines (25 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
services:
# 3. Dein ASP.NET Core Service (TodoApi)
# 3. Dein ASP.NET Core Service (TodoApi)
todoapi:
build:
context: .
dockerfile: Dockerfile.Development
hostname: todoapi
container_name: todoapi
ports:
- '5251:8080'
command: dotnet watch --project TodoApi.csproj run --urls http://0.0.0.0:8080 --no-launch-profile
environment:
- ASPNETCORE_ENVIRONMENT=Development
volumes:
# 1. Quellcode-Synchronisation: Synchronisiert alles außer bin/obj
- ./:/app
# 2. Verdeckte Volumes (NEU): Diese leeren, anonymen Volumes
# verhindern, dass die Host-Ordner 'bin' und 'obj' den Container
# erreichen. Dadurch werden bin/obj vom Container selbst erstellt,
# wodurch die Berechtigungsprobleme verschwinden.
- /app/bin
- /app/obj
# 3. Optional: Cache für NuGet-Pakete (unverändert)
# - ~/.nuget/packages:/root/.nuget/packages:ro