How to upgrade the elastic cluster deployed by docker?

Thank you, I know how to upgrade, but I'm not sure that there will be data loss or exception in this operation?