Moreover, when you define the network as external it means that it should already be created. Look closely, you named your network put_net but instead referenced it as pub_net in your service definition. How docker network can be created in docker-compose file, instead created beforehand? WARNING: Some networks were defined but are not used by any service: put_netĮRROR: Service "hadoop-cluster-hadoop0" uses an undefined network shell]#Ĭan anybody please help me on how to correct the docker-compose file? Hadoop0 -d -P hadoop-cluster-hadoop0:v1.1īut when I convert the above command to docker-compose file like below: version: '3' In the host, I have created docker network using below command: docker network create -d macvlan \ĭocker network shows below: shell]# docker network lsĪnd docker container with specified IP can be started by command:ĭocker run -net=pub_net -ip=192.168.2.10 -name hadoop0 -hostname
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |