Docker network name has an extra "temp_" as prefix, how to remove it?

As far as I know these is the common behavior of docker-compose; It use the parent folder name as “context/prefix” for all the resources it’s controls.
I’m sure that if you run ‘docker ps -a’, the ‘nacos1’ container is named ‘temp_nacos1’.
In the case of the network, if you really need use another name, You can create it with ‘docker network create’; and then reference it in the ‘docker-compose’ as “external”.

1 Like