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.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-05-01 02:18:39 +0000
Seen: 8 times
Last updated: May 01 '23
What is Fullscreen Activity in Android?
What does 'Invalid argument (callbackUrlScheme): must be a valid URL scheme' mean?
How can SSL passthrough be implemented with Traefik in Kubernetes?
What is authentication using C# ASP.NET Core MVC?
What are the steps to create a semi-circular shape divided into 8 parts using HTML, CSS, or SVG?
What is the way to name parameters and REST API urls in Spring Boot?
How can ASP.NET Core be configured to incorporate various authorization strategies?