Docker sq
Docker Fundamentals - Persisting Data

The VOLUMES Instruction

Mute
Current Time 0:00
/
Duration Time 0:00
Loaded: 0%
Progress: 0%
Stream TypeLIVE
Remaining Time -0:00
 
PRO

The VOLUMES Instruction

A volume can also be automatically created by a Dockerfile with the VOLUME instruction. This is beneficial for containers that require volumes in order to run properly, like a postgresql database.

In your Dockerfile you can insert a command similar to this one:

VOLUME /var/lib/postgresql/data
 

I finished! On to the next chapter