55 lines
1.8 KiB
JSON
55 lines
1.8 KiB
JSON
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
|
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
|
|
{
|
|
"name": "caddy-manager-devcon",
|
|
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
|
"image": "mcr.microsoft.com/devcontainers/dotnet:9.0",
|
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
|
// "features": {},
|
|
|
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
|
"forwardPorts": [
|
|
8080
|
|
],
|
|
"mounts": [
|
|
{
|
|
"source": "caddy-manager-data-protection",
|
|
"type": "volume",
|
|
"target": "/home/vscode/.aspnet/DataProtection-Keys"
|
|
},
|
|
{
|
|
"source": "caddy-manager-configdir",
|
|
"type": "volume",
|
|
"target": "/home/vscode/caddy/config"
|
|
}
|
|
],
|
|
// Use 'postCreateCommand' to run commands after the container is created.
|
|
// "postCreateCommand": "dotnet restore",
|
|
"postCreateCommand": {
|
|
"fixDataProtectionPerms": "sudo chown -R $(whoami): /home/vscode/.aspnet/DataProtection-Keys",
|
|
"fixCaddyConfigPerms": "sudo chown -R $(whoami): /home/vscode/caddy/config"
|
|
},
|
|
// Configure tool-specific properties.
|
|
"customizations": {
|
|
"jetbrains": {
|
|
"backend": "Rider"
|
|
},
|
|
"vscode": {
|
|
"extensions": [
|
|
"ms-dotnettools.csdevkit",
|
|
"murugaratham.vscode-dotnet-watch"
|
|
]
|
|
}
|
|
},
|
|
"features": {
|
|
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
|
|
},
|
|
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
|
// "remoteUser": "root"
|
|
"containerEnv": {
|
|
"Docker__CaddyContainerName": "caddy",
|
|
"Docker__DockerHost": "unix:///var/run/docker.sock",
|
|
"Caddy__ConfigDir": "/home/vscode/caddy/config"
|
|
}
|
|
}
|