What is tempfs in docker volume and how to use it?

DevOps

MOTOSHARE ๐Ÿš—๐Ÿ๏ธ
Turning Idle Vehicles into Shared Rides & Earnings

From Idle to Income. From Parked to Purpose.
Earn by Sharing, Ride by Renting.
Where Owners Earn, Riders Move.
Owners Earn. Riders Move. Motoshare Connects.

With Motoshare, every parked vehicle finds a purpose. Owners earn. Renters ride.
๐Ÿš€ Everyone wins.

Start Your Journey with Motoshare

tmpfs mount is temporary, and only persisted in the host memory. When the container stops, the tmpfs mount is removed, and files written there wonโ€™t be persisted.

This is useful to temporarily store sensitive files that you donโ€™t want to persist in either the host or the container writable layer

# example to use tmpfs mount 

docker run -itd --name harshit5 --mount type=tmpfs,destination=/opt/harshit ubuntuCode language: PHP (php)