You can double check if the file name is correct. In my example I’m using channelall.tx and channel12.tx, not mychannel.tx.
You can easily check the file name: docker exec -it peer0.org1.example.com ls
About Docker Swarm, I have check several examples using Docker Swarm to build the connection. For some reasons they are not working as smoothly as using extra_host. Therefore I am not using Docker Swarm. Just use extra_host which will create an entry in /etc/hosts.
Regarding the chaincode invoke, just see if it is caused by the first item.