Sensitive data in a volume must be encrypted at rest.
AdvancedScenarioVolumes, storage and data
Answer
Situation read → Docker volumes are plain directories.
What I'd do → Encrypt below Docker: LUKS on the disk that holds /var/lib/docker or the volume path, or cloud-provider encrypted block storage (EBS with KMS). For app-level secrets use envelope encryption in the app or database TDE.
Why → Docker itself has no volume encryption feature.
Interview tip → Also mention key management: who unlocks LUKS on reboot.
More on Volumes, storage and data
A Postgres container was removed and the data is gone. How should it have been run?BeginnerBind mount or named volume for local development of a Node app?BeginnerHow do you back up a named volume?IntermediateTwo containers must share files. What are your options?BeginnerA container needs a writable temp area but the root filesystem is read-only.IntermediateMoving a database volume from one Docker host to another.Intermediate