[Machine] The Messenger of Allah ﷺ forbade drinking from containers, saying that it is prohibited. This is narrated as a definite statement. As for what is narrated regarding using a water skin, the reports of prohibition are stronger in terms of their chain of transmission. Some scholars have suggested that if the water skin is hung up, don't put it on the ground. We have mentioned this in the book of knowledge and the book of comprehensive rulings.
أَنَّ رَسُولَ اللهِ ﷺ نَهَى أَنْ يُشْرَبَ مِنْ فِي السِّقَاءِ وَقَالَ إِنَّهُ يُنْتِنُهُ هَكَذَا رُوِيَ مُرْسَلًا وَأَمَّا الَّذِي رُوِيَ فِي الرُّخْصَةِ فِي ذَلِكَ فَأَخْبَارُ النَّهْيِ أَصَحُّ إِسْنَادًا وَقَدْ حَمَلَهُ بَعْضُ أَهْلِ الْعِلْمِ عَلَى مَا لَوْ كَانَ السِّقَاءُ مُعَلَّقًا فَلَا تَدْخُلُهُ هَوَامُّ الْأَرْضِ وَقَدْ ذَكَرْنَاهُ فِي كِتَابِ الْمَعْرِفَةِ وَكِتَابِ الْجَامِعِ