docker service create-- mount src=tomcatdata,dst=/usr/local/tomcat/webapps-- name myweb-- publish 80 replicas 8080-- replicas 4 tomcat
for example, if I manually created the tomcatdata volume, there would be no problem with the above command.
if I did not create a volume, the above command will prompt that the volume cannot be found. Is there a way to create it automatically?
Sorry, it could not be created automatically because of a permission problem with the docker directory. It will be all right after it has been changed.
what do I do if I want to mount two volumes at the same time?
for example, what to do if you want to mount the webapps and logs directories of tomcat to two different local volumes.