I'm learning my way around swarm mode at this point, and normally when wanting to copy files to and from a container in non-swarm mode I would just do something like the following, to copy a file to a container named "swag":
docker cp "C:\Sites\somefile.conf" swag:/config/nginx/proxy-confs
But in swarm mode, the container names are appended with .<some long random hash each time one is started>
, i.e. stackname_swag.d98s7fds89f98d7sf
.
Using "swag" as the container name in that case fails, as does using "stackname_swag". I am assuming that one could copy the entire container name including the hash (haven't tried it), and I know that I can copy the container ID and use that instead of the container name, but it seems like there should be a method where you don't have to do a look-up first to copy an ID or a name + hash, and just use a general "name" of a container/service ...
Is there such a method?