Ask Your Question
1

How can the DockerfileRunArguments parameter be applied in launchsettings.json using Visual Studio?

asked 2023-05-01 02:18:39 +0000

lakamha gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-05-01 02:23:01 +0000

lalupa gravatar image

The DockerfileRunArguments parameter can be applied in launchsettings.json using Visual Studio as follows:

  1. Open the launchsettings.json file in the root directory of your project.

  2. 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"
    ]
  }
}
  1. Save the launchsettings.json file.

  2. Restart your project in Visual Studio.

  3. The DockerfileRunArguments parameters will be applied to your Docker container when it is launched.

edit flag offensive delete link more

Your Answer

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

Add Answer


Question Tools

Stats

Asked: 2023-05-01 02:18:39 +0000

Seen: 8 times

Last updated: May 01 '23