When running a docker-compose.dcproj
project from the Visual Studio 2019 (using regular F5 Debug) it automatically executes this command (unrelated parts removed):
docker-compose -f -p dockercompose5867848916081622061 up
How do I force to regenerate this hash dockercompose5867848916081622061
or replace it with my own value? The issue is that if the solution folder was copied from another project the containers are unable to respond to any incoming requests and just hang
UPD: changing this name didn't help me, getting a meaningful name would still be helpful though
For docker-compose , you can set the top level variable name to your desired project name.
In the Web API project, again right-click on the project node, and choose Add > Container Orchestrator Support. Choose Docker Compose, and then select the same target OS. In this step, Visual Studio will offer to create a Dockerfile.
With Visual Studio 2019, you can use Docker Compose, Kubernetes, and Service Fabric as container orchestration services.
As of Visual Studio 16.9, you can use <DockerComposeProjectName>my-docker-compose-project</DockerComposeProjectName>
in the dcproj
file to specify the docker-compose project name.
See https://github.com/microsoft/DockerTools/issues/171
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With