1 | initial version |
The DockerfileRunArguments parameter can be applied in launchsettings.json using Visual Studio as follows:
Open the launchsettings.json file in the root directory of your project.
Find the configuration for your Docker container and add the DockerfileRunArguments parameter to it. For example:
{
"name": "Docker",
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dockerOptions": {
"image": "myproject:latest",
"dockerfile": "Dockerfile",
"network": "host",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"DockerfileRunArguments": [
"--foo=bar",
"--baz=qux"
]
}
}
Save the launchsettings.json file.
Restart your project in Visual Studio.
The DockerfileRunArguments parameters will be applied to your Docker container when it is launched.