Closed punkouter2021 closed 3 years ago
Did you change anything in docker-compose files ? if yes it could be the format error, please format again your yaml files and try again. If no changes the docker could be the can't identify the services, please remove all running containers and images than restart your docker and try again.
if you inspect the which microservices makes problem you can also run with build command; docker-compose -f docker-compose.yml -f docker-compose.override.yml up –build
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(384,5): error DT1001: ERROR: for ordering.api Cannot create container for service ordering.api: Duplicate mount point: /root/.aspnet/https 9>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(384,5): error DT1001: If the error persists, try restarting Docker Desktop. 9>Done building project "docker-compose.dcproj" -- FAILED.
I dunno whats going on.. i removed all running containers.
In some cases docker not worked consistency. So my recommendation is stopping all containers , remove all containers, remove all images. After that changed a docker setting - 'Switch to linux containers' (if it is windows containers) and restart the docker. After that run the docker-compose command. Since it is working -d mode, it will take time to up all microservices so wait for a while and check urls. It should be work.
Hello everyone. has anyone had this error? I just clone the repo and start this command in the root of project
For building you need to put 2 dash. it should be --build
Thank you for the answer @mehmetozkaya but it doesn't work
version:
P.S. in ur book only one dash before build command
docker-compose -f docker-compose.yml -f docker-compose.override.yml up –d
WARNING: The WEBAPP_STORAGE_HOME variable is not set. Defaulting to a blank string. WARNING: The HOME variable is not set. Defaulting to a blank string. Creating network "run-aspnetcore-microservices_default" with the default driver ERROR: No such service: –d